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
It's impossible to create a flux objective and add it to an L3v2 model:
If you run createFluxObjective(), it gives you an object with a getLevel() of 3, a getVersion() of 2, and a getPackageVersion() of 3. When you call 'setVariableType', it notices that getVersion is 2, and returns LIBSBML_UNEXPECTED_ATTRIBUTE.
If you create a FluxObjective with FluxObjective(3,1,3), it lets you call 'setVariableType', but doesn't let you call addFluxObjective(), because of the version mismatch to the core SBML object.
I propose that packages in general should never check the core level or version; they should only check the package version. (Perhaps the layout/render functions could check the core level, but even they shouldn't check the core version.) Putting 'version1' in the namespace string turns out to be a terrible idea, but that ship has sailed; at this point, all we can do is just not check it.
For the immediate problem, I say we don't check versions when calling 'addXXX', nor when calling 'setVariableType' for FBC objects, but a more thorough scouring of the code will probably be necessary to check for other packages moving forward.
It's impossible to create a flux objective and add it to an L3v2 model:
I propose that packages in general should never check the core level or version; they should only check the package version. (Perhaps the layout/render functions could check the core level, but even they shouldn't check the core version.) Putting 'version1' in the namespace string turns out to be a terrible idea, but that ship has sailed; at this point, all we can do is just not check it.
For the immediate problem, I say we don't check versions when calling 'addXXX', nor when calling 'setVariableType' for FBC objects, but a more thorough scouring of the code will probably be necessary to check for other packages moving forward.
@skeating @fbergmann Opinions?
The text was updated successfully, but these errors were encountered: