#3670 closed defect (fixed)
OMEdit does not apply Target Compiler and Target Language setting after restart
Reported by: | Rüdiger Franke | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9.4 |
Component: | OMEdit | Version: | v1.9.4-dev-nightly |
Keywords: | Cc: |
Description (last modified by )
The recent version 1.9.4 offers the new GUI dialogs
Tools->Options->Simulation->Target Language
Tools->Options->Simulation->Target Compiler
These settings are kept upon restart, but are not applied anymore. The bug can be reproduced as follows:
- open OMEdit
- select Target Language: Cpp and Target Compiler: msvc
- close OMEdit
- open OMEdit
- select a model, e.g. Modelica.Blocks.Examples.Filter
- simulate the model --> the default settings C and gcc will be used
The options are applied after opening the Tools->Options->Simulation dialog and confirming the settings with OK before simulating (or FMU exporting) a model.
This bug is seen a blocker because the new feature is explicitly announced in the release notes and should work then.
When fixing the ticket, could possibly the layout of the Target Language dialog be changed from:
C | CSharp | Cpp | ...
to:
C | Cpp | CSharp | ...
Alternatively a lexographical order:
None | Adevs | C | Cpp | CSharp | Java | JavaScript | sfmi | XML
Change History (10)
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
follow-up: 3 comment:2 by , 9 years ago
comment:3 by , 9 years ago
Replying to dietmarw:
C | Cpp | CSharp | ...
If it is about display why not:
C | C++ | C# | ...
I believe we can't change it since they are used as flags.
comment:4 by , 9 years ago
According to the procedure explained above I can't reproduce the issue.
The order of target language is done in https://github.com/OpenModelica/OMCompiler/pull/381
comment:5 by , 9 years ago
Hmm. Just upgraded to the new versions 4f02c1 of OMCompiler and db0641 of OMEdit. Can confirm the re-ordering of target languages. The settings are still ignored upon restart though. Get the same behaviour under Windows and Linux.
Here is another test: start OMEdit and invoke the menu:
Tools->OpenModelica Compiler CLI
The last logged commands are:
getComponents(Modelica, useQuotes = true) {} getClassNames(AllLoadedClasses,false,false,false,false,true) {ModelicaReference,ModelicaServices,Complex,Modelica} setMatchingAlgorithm("PFPlusExt") true setIndexReductionMethod("dynamicStateSelection") true setCommandLineOptions(+d=initialization) true
Only after opening Tools->Options->Simulation and confirming with OK, the OpenModelica Compiler CLI mentions targets:
clearCommandLineOptions() true setCommandLineOptions(+simCodeTarget=Cpp) true setCommandLineOptions(+target=msvc) true setCommandLineOptions(+d=initialization) true
comment:7 by , 9 years ago
I could not longer get OMEdit to simulate anything.
[1] 21:55:03 Scripting Notification Generated code for the target language None at /private/var/folders/s4/0j3cshj161126ygbpbzsdkmd4h24dl/T/OpenModelica_adershowitz/OMEdit.
I had noticed the above defect, and fix, so I tried to change the setting to C, from "None", and now OMEdit again works.
I think that a129b0f now makes OMEdit default to missing a target language, which causes an error.
comment:8 by , 9 years ago
Yes, you are right. I re-ordered the target languages and it makes None
the default one and since I have C
already chosen in my settings file so everything was working fine for me.
I have fixed this now in edc0f94/OMEdit.
If it is about display why not:
C | C++ | C# | ...