Closed adrpo closed 3 years ago
There is a problem. I just realized that Dymola 2021x automatically rewrite these expression from MMb[1:nS-1] . sV[1:nS-1] to (MMb.sV)[1:nS-1])
So I apologize if it occurs anytime in future commit. It will be hard to guard it.
Ok. Thanks for the heads up. We have another strategy to handle this in OpenModelica, support it and warn about it. We'll find a way.
You could add a CI check to parse the library using OpenModelica or moparser to prevent illegal syntax from being added (if you use pull requests). Or a precommit hook in git that tries to parse using one of the tools. Then you get an early error :)
Can I call you to learn how to "add this CI check" or "precommit hook". Or is it somewhere described?
https://github.com/features/actions https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
I can probably write some short example for a Github action (didn't try it myself since we setup or CI/CD a long time ago)
It looks good. Thank you Martin.
It seems that Dymola gives us more work by supporting non (yet) standard syntax
(expression)[index]
. This is not yet even allowed in Modelica spec 3.5, see: https://github.com/modelica/ModelicaSpecification/issues/2659 See also #32