Skip to content

Add ExplicitImports.jl QA via SciMLTesting run_qa (all 6 checks green)#207

Draft
ChrisRackauckas-Claude wants to merge 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:qa-explicit-imports
Draft

Add ExplicitImports.jl QA via SciMLTesting run_qa (all 6 checks green)#207
ChrisRackauckas-Claude wants to merge 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:qa-explicit-imports

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Note

Please ignore this PR until it has been reviewed by @ChrisRackauckas.

What

Wires LabelledArrays' QA group through SciMLTesting's run_qa with the explicit_imports = true option, enabling all six ExplicitImports.jl checks and making them pass on both the 1.10 LTS and Julia 1:

  • no_implicit_imports
  • no_stale_explicit_imports
  • all_explicit_imports_via_owners
  • all_qualified_accesses_via_owners
  • all_qualified_accesses_are_public
  • all_explicit_imports_are_public

How (priority: FIX > DECLARE-PUBLIC > minimal-IGNORE)

Fixes

  • no_implicit_imports: replaced the blanket using LinearAlgebra, StaticArrays, ArrayInterface / using MacroTools / using PrecompileTools with explicit using X: X, names... imports (StaticArrays: MArray, SArray, Size, SOneTo, StaticArray, StaticVector; PrecompileTools: @setup_workload, @compile_workload).
  • Removed three self-qualified LabelledArrays. accesses (LAStyle, symnames, LArray).
  • Fixed a latent self-referential where {SOneTo <: SOneTo} in Base.reshape(::SLArray, ...) that only resolved because using StaticArrays leaked the global SOneTo as the typevar's bound. SOneTo is now explicitly imported and the signature uses the StaticArrays.SOneTo UnionAll directly.
  • deps_compat: added the missing LinearAlgebra [compat] entry, so that Aqua check now passes.

Ignore-list (minimal, documented)
The remaining non-public qualified accesses are genuine method-extension points or non-public dependency/Base internals with no public alternative (e.g. ArrayInterface.ismutable/restructure, Base.BroadcastStyle/dataids, ForwardDiff.Dual, StaticArrays.LU/size_tuple, MacroTools.@forward, PreallocationTools.enlargediffcache!). These are ignore-listed per-check in all_qualified_accesses_are_public. Four trailing Base names (@propagate_inbounds, OneTo, elsize, unsafe_convert) are public on 1.11+ but read as non-public on the 1.10 LTS (the public keyword postdates the LTS), so they are ignored only to keep the LTS lane green.

QA harness migration

The previous bare-Aqua/JET test/qa/qa.jl used @test_broken false markers. This PR replaces it with run_qa. The pre-existing Aqua ambiguities/unbound_args/undefined_exports findings and the JET setfield!-on-immutable-LArray finding (all tracked in #205) are carried forward via aqua_kwargs / JET-opt-out — no @test_broken lines remain.

Verification (local)

QA group run via the real run_tests() harness (GROUP=QA) and directly:

# Julia 1 (1.12) and Julia 1.10 LTS both:
Quality Assurance | 14  14   pass

ExplicitImports                     | 6  6
  no_implicit_imports               | 1  1
  no_stale_explicit_imports         | 1  1
  all_explicit_imports_via_owners   | 1  1
  all_qualified_accesses_via_owners | 1  1
  all_qualified_accesses_are_public | 1  1
  all_explicit_imports_are_public   | 1  1

Core test files (larrays.jl, slarrays.jl) exercising the changed import / reshape / broadcast / get_tmp paths pass with no failures. Runic-clean.

🤖 Generated with Claude Code

ChrisRackauckas and others added 2 commits June 24, 2026 12:00
Wire LabelledArrays' QA group through SciMLTesting's `run_qa` with the
`explicit_imports = true` option, enabling all six ExplicitImports.jl checks
(no_implicit_imports, no_stale_explicit_imports, all_explicit_imports_via_owners,
all_qualified_accesses_via_owners, all_qualified_accesses_are_public,
all_explicit_imports_are_public) and making them pass on both the 1.10 LTS and
Julia 1.

Fixes (FIX > DECLARE-PUBLIC > minimal-IGNORE):

* no_implicit_imports: replace the blanket `using LinearAlgebra, StaticArrays,
  ArrayInterface` / `using MacroTools` / `using PrecompileTools` with explicit
  `using X: X, names...` imports (StaticArrays names: MArray, SArray, Size,
  SOneTo, StaticArray, StaticVector; PrecompileTools: @setup_workload,
  @compile_workload).
* Remove three self-qualified `LabelledArrays.` accesses (LAStyle, symnames,
  LArray) so the module references its own names directly.
* Fix a latent self-referential `where {SOneTo <: SOneTo}` in `Base.reshape`
  for SLArray (it only resolved because `using StaticArrays` leaked the global
  `SOneTo` as the typevar bound); now `SOneTo` is explicitly imported and the
  signature uses the concrete `StaticArrays.SOneTo` UnionAll directly.
* deps_compat: add the missing `LinearAlgebra` `[compat]` entry, so that Aqua
  check now passes (was previously disabled).

The remaining non-public qualified accesses are genuine method-extension points
or non-public dependency/Base internals with no public alternative; they are
ignore-listed per-check (documented + minimal) rather than worked around.

Replaces the previous bare Aqua/JET `qa.jl` (which used `@test_broken false`
markers) with `run_qa`; the pre-existing Aqua ambiguities/unbound_args/
undefined_exports findings and the JET `setfield!`-on-immutable-LArray finding
(all tracked in SciML#205) are carried forward via
`aqua_kwargs`/JET-opt-out, no longer as `@test_broken`.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SciMLTesting 1.5.0 makes Aqua and ExplicitImports its own direct
dependencies and run_qa auto-detects them, so the per-repo qa.jl
collapses to the genuine overrides:

  * Drop the `Aqua = Aqua` / `ExplicitImports = ExplicitImports` module
    arguments (auto-detected) and the now-transitive Aqua/ExplicitImports
    entries from test/qa/Project.toml [deps]/[compat].
  * Keep `explicit_imports = true` (still opt-in in v1.5) plus the genuine
    per-repo `aqua_kwargs` (ambiguities/unbound_args/undefined_exports
    opt-outs, tracked in SciML#205) and `ei_kwargs` ignore-list.
  * JET stays opt-out (not loaded), matching prior behavior.
  * Bump SciMLTesting compat to 1.5 (root + test/qa).

Verified locally against the released SciMLTesting 1.5.0 via the CI
harness (activate_group_env) on Julia 1.10 and 1.11: Quality Assurance
runs the same 14 checks as before (Aqua's 8 + the 6 ExplicitImports
checks, no JET) and passes 14/14.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants