Remove broad ModelingToolkitBase reexport, export only what docs/tests need - #1558
ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
…s need `@reexport using ModelingToolkitBase` leaked the entire MTKB/Symbolics export surface (~300 names) through `using Catalyst`. Replace it with an explicit `export` list covering just the dependency-owned names that Catalyst's built documentation and test suite exercise: the symbolic DSL macros (`@parameters`, `@variables`, `@named`, `@brownians`, ...), core types (`System`, `Equation`, `Differential`, `Initial`, `Pre`, scope markers), and core accessors (`equations`, `parameters`, `unknowns`, `mtkcompile`, `complete`, ...). The `ModelingToolkitBase`, `Symbolics`, and `SymbolicUtils` module bindings stay exported. Shrink the QA `LEGACY_DEPENDENCY_REEXPORTS` allowlist to the same set and drop the `undefined_exports` Aqua exception (the stale `Variable` reexport it tracked is gone). `Reexport` is removed as a direct dependency. Documented under HISTORY.md "Unreleased"; no version bump. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Devin <devin@cognition.ai> Agent-Harness: Devin CLI 3000.10.21 Agent-Model: SWE-2 Max Agent-Session: local session 7cb1e8c5a1cf4f23 (transcript: /home/crackauc/.local/share/devin/cli/summaries/history_7cb1e8c5a1cf4f23.md)
|
Wouldn’t this be breaking? |
|
More generally is there a context where one wants Catalyst but not MTKBase? |
|
Yeah we can make this a breaking release. But I think the bigger thing is, Catalyst should probably be choosing what it considers its public API, rather than deriving it from whatever happens downstream (that makes the definition of breaking very loose), so the question is moreso whether this is the right set. |
|
Heads-up on overlap: this and #1559 address the same QA failure — This PR is the structural fix: it removes the wholesale MTKBase reexport and exports an explicit curated list, so the allowlist entry for #1559 is the alternative minimal fix: it just approves the three names in These are mutually exclusive — merge at most one. If this PR merges, #1559 should be closed unmerged. |
Summary
@reexport using ModelingToolkitBaseleaked the entire MTKB/Symbolics export surface (~300 names, including transitive reexports likesolve,Num,structural_simplify,ODESystem,@syms,@mtkbuild,unwrap, ...) throughusing Catalyst.This PR replaces it with an explicit
exportlist of just the dependency-owned names that Catalyst's built documentation and test suite actually exercise throughusing Catalyst:@parameters,@variables,@independent_variables,@discretes,@brownians,@poissonians,@named,@nonamespace,@mtkcomplete,@register_symbolic,@unpackModelingToolkitBase,Symbolics,SymbolicUtilsSystem,Equation,Differential,Initial,Pre,GlobalScope,ParentScopecomplete,compose,continuous_events,equations,extend,full_equations,getmetadata,hasmetadata,independent_variables,isinitial,mtkcompile,observed,operation,parameters,setmetadata,simplify,substitute,unknownsODEProblem,SDEProblem,JumpProblem,NonlinearProblem,SteadyStateProblem(unchanged pre-existing exports)CartesianGrid,CartesianGridRej(unchanged pre-existing exports)test/qa/qa.jl'sLEGACY_DEPENDENCY_REEXPORTSallowlist is shrunk to the same set, and theundefined_exportsAqua exception is removed since the staleVariablereexport it tracked is gone.Reexportis dropped as a direct dependency. HISTORY.md documents the change under "Unreleased"; no version bump — not marked breaking.Test plan
GROUP=QA julia --project -e 'using Pkg; Pkg.test()'— passes (14 pass / 6 expected-broken; ExplicitImports reexport check matches the allowlist exactly, Aquaundefined_exportsnow clean)GROUP=Extensions julia --project -e 'using Pkg; Pkg.test()'— passesindependent_variables, was caught this way and added)julia --project=docs docs/make.jl— full docs build completes; all 168@exampleblocks evaluatetyposcleanPkg.test()not run end-to-end (files were run individually instead; the Hybrid lane is separate fromAlland its file passes)🤖 Generated with Devin CLI (model: SWE-2 Max), harness version 3000.10.21
Session: local session 7cb1e8c5a1cf4f23 (transcript: /home/crackauc/.local/share/devin/cli/summaries/history_7cb1e8c5a1cf4f23.md)