-
Notifications
You must be signed in to change notification settings - Fork 164
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
Fix nontrivial typos #2170
Fix nontrivial typos #2170
Conversation
@kristinmajetta Can you please check the changes for Spice3? I noticed that mos2RenameParametersDev sets the obsolete variables m_drainPerimiter/m_sourcePerimiter. which looks like a real bug, not just a typo fix. It is changed to set m_drainPerimeter/m_sourcePerimeter. Is this fine for you? |
Yes, setting the variables m_drainPerimeter/m_sourcePerimeter is fine for me. |
Yes, and was already dealt with in February 2017. |
So? Can we close the ticket? |
No. This ticket is on the non-trivial typos (e.g., jucntioncap, united_converging_crossection and lamda) in Spice3, Fluid.Dissipation and Thermal.FluidHeatFlow and schedulded for the next major release. The Spice3 issue on m_drainPerimiter/m_sourcePerimiter was detected (and resolved) en passant. |
This is a non-backwards compatible change. Was there a decision that the next major MSL version will allow non-backwards compatible changes (and therefore support of the conversion annotations introduced in Modelica 3.4 is needed in the tools) |
For that reason, the milestone is set to MSL_next-MAJOR-version, which is defined as the next (not yet specified) major version which is non-backward compatible and (might) need a conversion script. This PR should not be merged to master right now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure that this does not get merged too soon. It is still missing the conversionScript additions that should follow with the renames.
@HansOlsson I am struggling on conversion scripts. Given a record where a component is removed (between two library releases), how can the record ctor call be converted. Currently, my conversion test model that runs in MSL v3.2.3, but no longer runs in MSL v4.0.0 is: model Issue940 "Conversion test for #940"
parameter Modelica.Electrical.Spice3.Internal.Mosfet.Mosfet r1 = Modelica.Electrical.Spice3.Internal.Mosfet.Mosfet(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, true);
parameter Modelica.Electrical.Spice3.Internal.Mosfet.Mosfet r2 = Modelica.Electrical.Spice3.Internal.Mosfet.Mosfet(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, m_drainPerimiter=19, m_sourcePerimiter=20, m_uic=true);
annotation(experiment(StopTime=1), Documentation(info="<html>
<p>
Conversion test for <a href=\"https://github.com/modelica/ModelicaStandardLibrary/issues/940\">#940</a>.
</p>
</html>"));
end Issue940; |
Record constructor calls should be similar to function calls, it's just that we have to consider that every record is potentially also a function. However, looking closely it seems the problem is a record constructor (or function call) where elements in the record (or function) are removed, is that correct? |
Yes, that is the case here. I believe it is rather impossible to convert record ctor calls for record classes where components have been removed or component types are changed. I will simply add a convertMessage here. Since Mosfet.Mosfet is in Modelica.Electrical.Spice3.Internal and shall not be used by users, there is enough hope that no user is affected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Preparation to fix #940.
Credits go to @kdavies4.