Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#6027 closed enhancement (fixed)

loadModel takes conversion(noneFromVersion) annotation into account before issuing warnings

Reported by: Francesco Casella Owned by: Martin Sjölund
Priority: blocker Milestone: 1.16.0
Component: Interactive Environment Version:
Keywords: Cc:

Description

So far, we shipped many different versions of the MSL, specifically 3.2.1, 3.2.2, and 3.2.3. This was to accommodate libraries with uses annotations pointing to older MSL version.

In fact, we just realized this doesn't make much sense. MSL 3.2.3 is meant to be fully backwards-compatible with 3.2.2 and 3.2.1, and besides the semantic versioning number, this is made explicit by the annotation

annotation(conversion(
 noneFromVersion="3.2.2",
 noneFromVersion="3.2.1",
 noneFromVersion="3.2",
 noneFromVersion="3.1",
 noneFromVersion="3.0.1",
 noneFromVersion="3.0",...);

it contains. Which means, if we have MSL 3.2.3 installed we can use it directly in conjuction with any Modelica library that has a uses annotation referring to any of those versions. Without the need of warnings scaring users of potential problems.

I would issue a simple notification, like

Library XYZ uses Modelica 3.2.1. Modelica 3.2.3 is used instead, which was released later and is fully compatible.

This also allows to use mixed libraries with different (but compatible!) uses annotations, without the need of modifying them locally, which is always problematic.

Change History (5)

comment:1 by Martin Sjölund, 4 years ago

Testing https://github.com/OpenModelica/OpenModelica/pull/989 now. It needs to be cherry-picked into 1.16 as well if it is working.

comment:2 by Martin Sjölund, 4 years ago

I guess there are changed needed in the testsuite as well...

comment:3 by Martin Sjölund, 4 years ago

Resolution: fixed
Status: newclosed

https://github.com/OpenModelica/OpenModelica/pull/996 also merged to 1.16 now. Took longer than expected to fix this...

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

Summary: Take conversion(noneFromVersion) annotation into accountloadModel takes conversion(noneFromVersion) annotation into account before issuing warnings

comment:5 by Francesco Casella, 4 years ago

Thank you @sjoelund.se!

I think this is a big step forward in OMEdit usability. I'll mention that in the release notes.

Note: See TracTickets for help on using tickets.