Skip to content

QA: ExplicitImports no_implicit_imports — make reexported SciML-stack imports explicit #301

Description

@ChrisRackauckas-Claude

Tracking the @test_broken placeholder for the ExplicitImports check_no_implicit_imports check, enabled when converting test/qa/qa.jl to the SciMLTesting run_qa v1.6 form with explicit_imports = true (ei_broken = (:no_implicit_imports,)).

ExplicitImports.check_no_implicit_imports(EasyModelAnalysis) reports ~52 names relied on implicitly. They come from the package's intentional heavy reexport / bulk-using of the SciML stack in src/EasyModelAnalysis.jl:

@reexport using DifferentialEquations
@reexport using ModelingToolkit
@reexport using Distributions
using Optimization, OptimizationBBO, OptimizationNLopt
using GlobalSensitivity, Turing
using AbstractMCMC
using SciMLExpectations
@reexport using Plots
using SciMLBase.EnsembleAnalysis

The flagged names include whole modules (DifferentialEquations, ModelingToolkit, Distributions, Plots, Turing, GlobalSensitivity, Optimization, SciMLBase, SciMLExpectations, AbstractMCMC, ...) plus the specific names actually used (norm, Num, cost, I, InverseGamma, MvNormal, product_distribution, remake, solve, terminate!, ContinuousCallback, EnsembleProblem/EnsembleSerial/EnsembleThreads/EnsembleSolution, ODESolution, OptimizationProblem, BBO_adaptive_de_rand_1_bin_radiuslimited, Opt/NLopt/inequality_constraint!, HCubatureJL, Koopman/ExpectationProblem/GenericDistribution/SystemMap, @layout/bar/plot/plot!/scatter!, Sobol, ...).

This is the documented "MANY heavy using BigDep" case: making every name explicit (using X: a, b, ...) is a large, risk-bearing refactor across a package whose public surface is partly the reexported SciML stack, and several of these (the bare module names, the reexports) are deliberately part of the API. Mass-rewriting risks dropping a name a downstream relies on. Until that refactor is done carefully, the check is run under @test_broken so a green QA lane records Broken (and auto-flags an Unexpected Pass once the imports are made explicit).

The other five ExplicitImports checks pass (with small, documented ignore-lists for non-owner / non-public qualified accesses to dependency internals: AbstractSystem, DynamicPPL, unwrap, AbstractMCMCEnsemble, LN_SBPLX, successful_retcode).

ignore until reviewed by @ChrisRackauckas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions