Closed eshmoylova closed 3 months ago
In Directory Hierarchy Mapping section of the Specification, it says:
Classes and constants that are stored in package.mo are also present in package.order but their relative order should be identical to the one in package.mo (this ensures that the relative order between classes and constants stored in different ways is preserved).
There are two cases where the order of classes in package.mo and package.order do not match: Media/IdealGases/Common/package.mo does not match Media/IdealGases/Common/package.mo, in particular, DataRecord is not followed by SingleGasNasa in package.order
I don't know if the text is unclear, some misunderstanding, or the variants have diverged but what I see is that package.order contains
package.mo contains the ones in bold in the following order:
So, the sub-set of classes in package.mo keep their relative order from package.order; the other classes Functions, FluidData, SingleGasesData are defined in other files. This allows you to freely order all of the classes (and constants) - regardless of whether they are stored in package.mo or in a separate file (or directory); and without having the weird situation that you have one order in package.mo and then shuffle them in package.order.
Math/package.mo does not match Math/package.order: classes defined outside of package.mo are interspersed with classes defined in package.mo. If the the order given in package.order is preferred, the classes in package.mo need to be taken out into stand-alone files.
I believe it is similar here, but didn't go through all of them.
I submitted a separate issue against the specification https://github.com/modelica/ModelicaSpecification/issues/3438 to clarify what relative order is. Will update here, depending on the decision there.
Closing. The Language group agreement was that this should be allowed.
In Directory Hierarchy Mapping section of the Specification, it says:
There are two cases where the order of classes in package.mo and package.order do not match: Media/IdealGases/Common/package.mo does not match Media/IdealGases/Common/package.mo, in particular, DataRecord is not followed by SingleGasNasa in package.order
Math/package.mo does not match Math/package.order: classes defined outside of package.mo are interspersed with classes defined in package.mo.
If the the order given in package.order is preferred, the classes in package.mo need to be taken out into stand-alone files.