Repository navigation
fix: reference Symbolics-owned names through Symbolics in tests - #4991
Merged
ChrisRackauckas merged 1 commit intoAug 18, 2026
Merged
ChrisRackauckas merged 1 commit into
ChrisRackauckas merged 1 commit into
Conversation
SciML#4989 trimmed `hessian_sparsity`, `MultithreadedForm`, `SerialForm`, `CTarget` and `derivative` from ModelingToolkitBase's Symbolics import list, as ExplicitImports reported them unused in `src`. They were still reached as `ModelingToolkitBase.<name>` from tests, and none is exported by Symbolics, so the re-export does not cover them. That broke InterfaceII and Extended. Reference them through Symbolics, which owns them. Co-Authored-By: Chris Rackauckas <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What broke
#4989 (mine) trimmed ModelingToolkitBase's
import Symbolics: ...list using ExplicitImports' stale-import report. Five of the removed names were still reached asModelingToolkitBase.<name>/ModelingToolkit.<name>from the test suite:hessian_sparsitylib/ModelingToolkitBase/test/nonlinearsystem.jl:95,97MultithreadedFormlib/ModelingToolkitBase/test/bigsystem.jl:60,80SerialFormlib/ModelingToolkitBase/test/bigsystem.jl:79CTargetlib/ModelingToolkitBase/test/ccompile.jl:12derivativetest/reduction.jl:270ExplicitImports was right that
srcnever uses them, but they were in ModelingToolkitBase's namespace because of those imports, and none of the five is exported by Symbolics (Base.isexported(Symbolics, :hessian_sparsity) == false, same forMultithreadedForm), so@reexport using Symbolicsdoes not cover them.Master is currently red as a result:
InterfaceIIon all three Julia versions andExtendedon all three.The fix
Reference each through Symbolics, the module that owns them — consistent with #4989's intent rather than reverting it. Test-only changes; no
srcchange, so the import hygiene stays as merged.Verification
lib/ModelingToolkitBase/test/nonlinearsystem.jlrun directly against this branch:Discriminating check — same branch, with only
nonlinearsystem.jlreverted to master's version:I searched for the complete set rather than fixing them one at a time: every identifier present in the import block before #4989 and absent after was cross-referenced against qualified
ModelingToolkit(Base).<name>uses acrosslib/,src/andtest/. That yielded exactly these five, and none remain.runic --checkclean on all four files.Not verified
I ran
nonlinearsystem.jldirectly, not the fullInterfaceIIorExtendedgroups (each ~50 min), and notccompile.jl/bigsystem.jl, which need a C compiler and a large sparse build respectively. CI covers those.Please ignore until reviewed by @ChrisRackauckas.