Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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 Rüdiger Franke)

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:

  1. open OMEdit
  2. select Target Language: Cpp and Target Compiler: msvc
  3. close OMEdit
  4. open OMEdit
  5. select a model, e.g. Modelica.Blocks.Examples.Filter
  6. 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 Rüdiger Franke, 9 years ago

Description: modified (diff)

comment:2 by Dietmar Winkler, 9 years ago

C | Cpp | CSharp | ...

If it is about display why not:

C | C++ | C# | ...

in reply to:  2 comment:3 by Adeel Asghar, 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 Adeel Asghar, 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 Rüdiger Franke, 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:6 by Adeel Asghar, 9 years ago

Resolution: fixed
Status: newclosed

Fixed in a129b0f/OMEdit.

comment:7 by Adam Dershowitz, 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 Adeel Asghar, 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.

comment:9 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:10 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.