The QA group (test/qa/qa.jl) now runs ExplicitImports.jl's six checks via run_qa(...; explicit_imports = true) (SciMLTesting v1.6 form). Five pass; check_no_implicit_imports is currently marked ei_broken = (:no_implicit_imports,) (records Broken, auto-flags an Unexpected Pass once resolved).
PDESystemLibrary relies on 24 implicit imports:
using DomainSets: DomainSets, .., Interval, domain
using Interpolations: Interpolations, Gridded, Linear, Periodic, extrapolate, interpolate
using Markdown: Markdown
using ModelingToolkit: ModelingToolkit, @named, @parameters, @variables, Differential, PDESystem, limit
using OrdinaryDiffEq: OrdinaryDiffEq
using OrdinaryDiffEqSDIRK: OrdinaryDiffEqSDIRK, ODEProblem, TRBDF2, solve
using Random: Random
Why this is kept broken rather than mechanically fixed:
- The names come from heavy re-exporting umbrellas. ExplicitImports reports the owner package, which is frequently not the package the module
usings: ../Interval/domain are owned by IntervalSets (re-exported via DomainSets); @variables/Differential/limit by Symbolics; @named/@parameters/PDESystem by ModelingToolkitBase; ODEProblem by SciMLBase; solve by CommonSolve. A using <owner>: name rewrite would pin those internal owner packages, which reshuffle names across releases — exactly the fragile mass-refactor the SciML QA guidance says to avoid.
- Two of the flagged names are not actually imports at all:
limit is a local function defined in lib/brusselator.jl, and domain is a local parameter/variable in lib/general_linear_system.jl and lib/linear_convection.jl. ExplicitImports flags them conservatively, so a blanket explicit-import rewrite would be incorrect.
Resolution options (future work):
- Make the genuinely-imported names explicit against the umbrella that re-exports them (e.g.
using ModelingToolkit: @variables, Differential, PDESystem, @named, @parameters), once it is confirmed stable across the supported ModelingToolkit/DomainSets/OrdinaryDiffEq compat ranges.
- Or add the local-definition shadows (
limit, domain) to the no_implicit_imports ignore list and resolve the rest.
When resolved, drop :no_implicit_imports from ei_broken in test/qa/qa.jl.
The QA group (
test/qa/qa.jl) now runs ExplicitImports.jl's six checks viarun_qa(...; explicit_imports = true)(SciMLTesting v1.6 form). Five pass;check_no_implicit_importsis currently markedei_broken = (:no_implicit_imports,)(recordsBroken, auto-flags an Unexpected Pass once resolved).PDESystemLibraryrelies on 24 implicit imports:Why this is kept broken rather than mechanically fixed:
usings:../Interval/domainare owned byIntervalSets(re-exported viaDomainSets);@variables/Differential/limitbySymbolics;@named/@parameters/PDESystembyModelingToolkitBase;ODEProblembySciMLBase;solvebyCommonSolve. Ausing <owner>: namerewrite would pin those internal owner packages, which reshuffle names across releases — exactly the fragile mass-refactor the SciML QA guidance says to avoid.limitis a local function defined inlib/brusselator.jl, anddomainis a local parameter/variable inlib/general_linear_system.jlandlib/linear_convection.jl. ExplicitImports flags them conservatively, so a blanket explicit-import rewrite would be incorrect.Resolution options (future work):
using ModelingToolkit: @variables, Differential, PDESystem, @named, @parameters), once it is confirmed stable across the supported ModelingToolkit/DomainSets/OrdinaryDiffEq compat ranges.limit,domain) to theno_implicit_importsignore list and resolve the rest.When resolved, drop
:no_implicit_importsfromei_brokenintest/qa/qa.jl.