Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

New restriction to only one principal top level package per file

New restriction to only one principal top level package per file

Hello again,

I just noticed that there has been introduced a new rule which only allows one principal top level package per file.

In my OpenModelica model library I sometimes defined multiple top level items just on one single file without defining an enclosing package. Hence in rev12698 the OpenModelica compiler is unable to load the library. Has this new rule been introduced on purpose? Then I will change my library to this concept. However, Dymola doesn't say anything and takes the library as is.

Thanks, Fritz

Re: New restriction to only one principal top level package per file

Using loadModel(), the package is a structured entity and some limitations are imposed according to the Modelica Specification 3.2 rev1: 13.2.2.1 Mapping a Package/Class Hierarchy into a Directory Hierarchy (Structured Entity).

[For example, if directory A contains the three files package.mo, B.mo and C.mo the classes defined are A, A.B, and A.C.]

So yes this is intended. We also check the package.order file to see if the author forgot to include a file, used wrong case in filenames, etc.

There are 0 guests and 0 other users also viewing this topic
You are here: