-
-
Notifications
You must be signed in to change notification settings - Fork 232
fix: FMI varname parse bug #3934 #3935
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
base: master
Are you sure you want to change the base?
fix: FMI varname parse bug #3934 #3935
Conversation
216d41a
to
8c1b37a
Compare
8c1b37a
to
559150b
Compare
… these files except ext/MTKFMIExt.jl!
This reformats the whole repo. Right now the formatter is broken so don't worry about it. Revert that. |
…h any of these files except ext/MTKFMIExt.jl!" This reverts commit 37c6897.
@ChrisRackauckas Thanks! I reverted the formatter commit. |
@ChrisRackauckas Question for you. It seems like the existing code in MTKFMIExt > parseFMIVariableName() mutates the "name" input variable. Is that OK? My understanding is that this is considered bad practice as Julia passes by reference. Also if it the input is mutated, the convention is to add ! to the function name, right? |
I don't see where it mutates it. It creates a view but then creates a Symbol, which is effectively an interned string. But I don't see it actually mutating the string? Put to the line that you're worried about. Though it probably shouldn't create the symbol there for performance reasons on large models, but that's a minor detail. |
Ok, I was concerned about the |
that just makes |
The test doesn't work |
@AayushSabharwal what is the problem with the test on your end? |
This PR Fixes #3934
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.