Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes ticket:6133 Made loadFile and loadModel behave same #6784

Merged
merged 6 commits into from Oct 5, 2020

Conversation

adeas31
Copy link
Member

@adeas31 adeas31 commented Sep 30, 2020

Changed the notify parameter to true by default.

Changed the notify parameter to true by default.
@@ -1126,6 +1126,8 @@ function loadFile "load file (*.mo) and merge it with the loaded AST."
input String fileName;
input String encoding = "UTF-8";
input Boolean uses = true;
input Boolean notify = true "Give a notification of the libraries and versions that were loaded";
input Boolean requireExactVersion = false "If the version is required to be exact, if there is a uses Modelica(version=\"3.2\"), Modelica 3.2.1 will not match it.";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does requireExactVersion mean for loadFile and friends? Don't you already point to the version you wanted to load?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its for the version of the uses annotation library.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then you are changing how loadModel works since that was always true. And your commit comment has nothing about this change in behaviour (only notify).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is even how loadModel is working. Try the test model in ticket:6133 with loadModel. By default it loads the PowerSystems library version 1.0.0 and if you specify requireExactVersion to true then it skips loading it since the version specified in uses annotation is uses(PowerSystems(version = "0.9.0")).

So this PR is not changing anything with loadModel.

@adeas31 adeas31 merged commit 094bb66 into OpenModelica:master Oct 5, 2020
@adeas31 adeas31 deleted the ticket-6133 branch October 5, 2020 13:48
adeas31 added a commit to adeas31/OpenModelica that referenced this pull request Oct 9, 2020
…ca#6784)

Enable notifications for all except loadModel
OMEdit has notifications enabled on all by default
Update NFFrontEnd/NFModelicaBuiltin.mo accordingly
adeas31 added a commit that referenced this pull request Oct 9, 2020
Enable notifications for all except loadModel
OMEdit has notifications enabled on all by default
Update NFFrontEnd/NFModelicaBuiltin.mo accordingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants