Add ExplicitImports.jl QA via SciMLTesting run_qa (all 6 checks green)#207
Draft
ChrisRackauckas-Claude wants to merge 2 commits into
Draft
Add ExplicitImports.jl QA via SciMLTesting run_qa (all 6 checks green)#207ChrisRackauckas-Claude wants to merge 2 commits into
ChrisRackauckas-Claude wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Please ignore this PR until it has been reviewed by @ChrisRackauckas.
What
Wires LabelledArrays' QA group through SciMLTesting's
run_qawith theexplicit_imports = trueoption, enabling all six ExplicitImports.jl checks and making them pass on both the 1.10 LTS and Julia 1:no_implicit_importsno_stale_explicit_importsall_explicit_imports_via_ownersall_qualified_accesses_via_ownersall_qualified_accesses_are_publicall_explicit_imports_are_publicHow (priority: FIX > DECLARE-PUBLIC > minimal-IGNORE)
Fixes
no_implicit_imports: replaced the blanketusing LinearAlgebra, StaticArrays, ArrayInterface/using MacroTools/using PrecompileToolswith explicitusing X: X, names...imports (StaticArrays:MArray, SArray, Size, SOneTo, StaticArray, StaticVector; PrecompileTools:@setup_workload, @compile_workload).LabelledArrays.accesses (LAStyle,symnames,LArray).where {SOneTo <: SOneTo}inBase.reshape(::SLArray, ...)that only resolved becauseusing StaticArraysleaked the globalSOneToas the typevar's bound.SOneTois now explicitly imported and the signature uses theStaticArrays.SOneToUnionAll directly.deps_compat: added the missingLinearAlgebra[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 inall_qualified_accesses_are_public. Four trailing Base names (@propagate_inbounds,OneTo,elsize,unsafe_convert) arepublicon 1.11+ but read as non-public on the 1.10 LTS (thepublickeyword 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.jlused@test_broken falsemarkers. This PR replaces it withrun_qa. The pre-existing Aquaambiguities/unbound_args/undefined_exportsfindings and the JETsetfield!-on-immutable-LArrayfinding (all tracked in #205) are carried forward viaaqua_kwargs/ JET-opt-out — no@test_brokenlines remain.Verification (local)
QA group run via the real
run_tests()harness (GROUP=QA) and directly:Core test files (
larrays.jl,slarrays.jl) exercising the changed import / reshape / broadcast /get_tmppaths pass with no failures. Runic-clean.🤖 Generated with Claude Code