You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This comes up in other spots too. (IS's test_printing.jl used to compare with ==, but then it started erroring due to InfrastructureSystems.Foo vs Foo, so I changed it to occursin.) It'd be great to have a comprehensive approach for this.
It'd be great to have a comprehensive approach for this.
The "correct" approach is to use the actual data types as keys, rather than converting them to some sort of Symbol.
The issue is that it's really hard to detect and fix these scoping issues because they depend on package imports, and the tests just bring everything into scope with using.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This threw me for a loop. I'm using
as a script. And I had it working. Then restarted Julia and had a cryptic error message about a missing symbol
"PowerSystems.Line".The issue is that in the guts of
set_device_model!we callnameof(D)to set the key:https://github.com/Sienna-Platform/InfrastructureOptimizationModels.jl/blob/9ccee6240f9b07ee16bf5a23b144e2a9e4fc4459/src/core/device_model.jl#L112-L116
but in POM we use
Symbol(D). These differ depending on whetherDis in the current scope:I must have had
using PowerSystemsin the first REPL and not the second.