Opened 8 years ago

Closed 7 years ago

#4378 closed defect (fixed)

OpenModelica seems to not support correctly packages saved in directories (as opposed to “single-file”), especially in case of model duplication

Reported by: giorgio.simonini@… Owned by: adeas31
Priority: blocker Milestone: Future
Component: OMEdit Version: v1.11.0
Keywords: Package, directories Cc: audrey.jardin@…, daniel.bouskela@…

Description

I got some errors doing the following (it shows some random behavior, so the error messages may change):

  1. Create a package “Test” and uncheck the “save in single file” option.
  2. Create a connector “c1” within the package.
  3. Duplicate “c1” to “c2”. The “within Test;” line is not copied and the following error message is prompt:

[1] 15:16:46 Syntaxe Erreur
[Test.c2: 1:12-1:18]: Parser error: Unexpected token near: within (WITHIN)

  1. Adding the “within” text by hand leads (generally) to errors not accepted by the text editor.
  2. Create a model “test” using the two connectors.
  3. Checking the model leads to the following error messages:

[1] 15:22:08 Traduction Erreur
[Test: 1:1-9:9]: Class c1 not found in scope Test.

[2] 15:22:08 Traduction Erreur
[Test.test: 0:0-0:0]: Class Test.c1 not found in scope Test.test.

[3] 15:22:08 Traduction Erreur
Error occurred while flattening model Test.test

Closing and loading back the package I got the following message:

[1] 15:27:37 Grammaire Avertissement
[C:\Users\D24676\Desktop\/Test/package.order: 0:0-0:0]: The package.order file does not list all .mo files and directories (containing package.mo) present in its directory.
Missing names are:

c1

Change History (3)

comment:1 Changed 8 years ago by janK

Hi Giorgio,
I also had a lot of trouble to duplicate models and packages. Doing it with OMEdit screwed up my library also from time to time. Some things do work but some do not. So the only save way to do it is by hand. I mean copy the files using Explorer, edit the package.order file and edit the within statements.
Remember that in OMEdit you also have to right-click your package and choose "save" in the Libraries Browser until the red font vanishes.
Further, I opened a ticket two weeks ago which is a bit related to that issue: #4350

Last edited 8 years ago by janK (previous) (diff)

comment:2 Changed 8 years ago by janK

  • Component changed from *unknown* to OMEdit
  • Owner changed from somebody to adeas31

comment:3 Changed 7 years ago by adeas31

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in 691dfe4/OMEdit.

Note: See TracTickets for help on using tickets.