Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3670 closed defect (fixed)

OMEdit does not apply Target Compiler and Target Language setting after restart

Reported by: rfranke Owned by: adeas31
Priority: blocker Milestone: 1.9.4
Component: OMEdit Version: v1.9.4-dev-nightly
Keywords: Cc:

Description (last modified by rfranke)

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 Changed 9 years ago by rfranke

  • Description modified (diff)

comment:2 follow-up: Changed 9 years ago by dietmarw

C | Cpp | CSharp | ...

If it is about display why not:

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

comment:3 in reply to: ↑ 2 Changed 9 years ago by adeas31

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 Changed 9 years ago by adeas31

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 Changed 9 years ago by rfranke

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 Changed 9 years ago by adeas31

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

Fixed in a129b0f/OMEdit.

comment:7 Changed 9 years ago by dersh

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 Changed 9 years ago by adeas31

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 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4 to 1.9.4-1.9.x

Milestone renamed

comment:10 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4-1.9.x to 1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.