Skip to content

QA: convert bare using to explicit imports (no_implicit_imports, tracked broken in #102) #103

Description

@ChrisRackauckas-Claude

The QA-form conversion in #102 enables the six ExplicitImports checks in every QA env. One check is marked ei_broken (runs as @test_broken, so it records Broken while green and auto-flags an Unexpected Pass once fixed) and is tracked here.

no_implicit_importsCorleone and CorleoneOED

Both packages bring all of their dependencies in with bare using Foo rather than explicit using Foo: bar, baz, so they rely on a large set of implicit imports. ExplicitImports' check_no_implicit_imports fails on each. Converting every implicit import to an explicit one is a sizable, mechanical-but-careful refactor (it must not drop names that downstream extensions extend via Mod.name), so it is tracked separately rather than blocking the QA conversion.

Corleone implicit imports (sample)

ChainRulesCore, Distributed, pmap, DocStringExtensions, FIELDS, FUNCTIONNAME, SIGNATURES, TYPEDEF, Functors, LinearAlgebra, LuxCore, AbstractLuxLayer, OhMyThreads, tmap, Random, RecursiveArrayTools, Reexport, SciMLBase (+ DAEProblem, EnsembleDistributed/Serial/Threads, ODEProblem, OptimizationProblem, intervals, remake), solve (CommonSolve), SciMLStructures, SymbolicIndexingInterface (+ NotTimeseries, SymbolCache, Timeseries, current_time, independent_variable_symbols, parameter_symbols, state_values, variable_symbols).

CorleoneOED implicit imports (sample)

Corleone (+ MultipleShootingLayer, SingleShootingLayer, Trajectory), DocStringExtensions (+ FIELDS, SIGNATURES, TYPEDEF), ForwardDiff, LinearAlgebra (+ Symmetric, det, eigvals, svd, tr, triu), LuxCore, Random, Reexport (+ @reexport), SciMLBase (+ DAEFunction, DAEProblem, ODEFunction, ODEProblem, remake), solve, SciMLStructures, SymbolicIndexingInterface (+ SymbolCache, getsym, observed), Symbolics (+ Num).

OptimalControlBenchmarks is not in this list: its no_implicit_imports check is handled with allow_unanalyzable (a dynamic include in problem_registry.jl makes the module unanalyzable), not ei_broken.

Fix

Replace the bare using with explicit using Mod: name1, name2, ... in src/Corleone.jl and lib/CorleoneOED/src/*.jl, then drop :no_implicit_imports from the ei_broken tuple in the corresponding test/qa/qa.jl. The check will auto-flag an Unexpected Pass to confirm.

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