Make the QA group scan the StaticArrays extension - #263
Merged
ChrisRackauckas merged 1 commit intoAug 1, 2026
Conversation
ExplicitImports only checks a package extension when the extension module actually exists, which requires its trigger weakdep to be loaded. The QA environment loaded no weakdeps, so ExponentialUtilitiesStaticArraysExt was never scanned. Load StaticArrays in test/qa/qa.jl so it is. The newly-scanned extension reported two findings. `using StaticArrays` followed by `StaticArrays.arithmetic_closure`/`SMatrix`/`SVector` is fixed at the source with an explicit import list. `arithmetic_closure` is documented by StaticArrays but not declared public and has no public equivalent, so it is ignored with a comment. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.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.
Why
SciMLTesting.run_qaruns ExplicitImports' checks on the package module.ExplicitImports does know about extensions — it reads the
[extensions]tableout of
Project.tomland adds each one to the set of checked modules — but onlyif the extension module actually exists:
An extension module only exists once its trigger weakdep has been loaded. The QA
environment loaded no weakdeps, so
ExponentialUtilitiesStaticArraysExtwasnever scanned by QA at all.
What changed
test/qa/Project.toml: addedStaticArrays(same UUID as the root[weakdeps]entry) with a[compat]bound mirroring the root1.9.8.test/qa/qa.jl:using StaticArraysbeforerun_qa, with a commentexplaining that this is what makes the extension visible to ExplicitImports.
Coverage: StaticArrays is the package's only weakdep, so this brings
extension coverage from 0/1 to 1/1. Nothing is left unscanned.
Findings from the newly-scanned extension, and how each was handled
Turning the scan on produced two failures.
Fixed at the source (not ignored) —
no_implicit_imports: the extension didusing StaticArraysand then referred toStaticArrays.arithmetic_closure,SMatrixandSVectorimplicitly. Changed tousing StaticArrays: StaticArrays, SMatrix, SVector. No behavior change; theall_explicit_imports_via_ownerscheck is satisfied by this spelling.Ignored with justification —
all_qualified_accesses_are_public:StaticArrays.arithmetic_closure. This is the only spelling of "the type you getfrom doing arithmetic on this eltype", which the extension needs in order to pick
the working eltype for
expvon an integer-valuedSMatrix. It is documented byStaticArrays — its own docstring demonstrates
import StaticArrays.arithmetic_closure— but StaticArrays has neverexportedit or declared it
public, and there is no public equivalent. Added to theexisting
all_qualified_accesses_are_publicignore tuple with a comment namingthe owner and the reason, matching the style already in the file.
No check was disabled, no
@test_brokenwas added, and no ignore was used wherea source fix was available.
Local verification
GROUP=QA julia --project=. -e 'using Pkg; Pkg.test()'on this branch:The 2 broken are the pre-existing
broken = truemarkers in the AllocChecktestset, unchanged by this PR. Before the ignore was added the same run showed
the two new extension findings as errors, confirming the extension is genuinely
being scanned now and not silently skipped.
Because the extension source changed,
GROUP=Corewas also run:Follow-up
The
Base.get_extensionskip quoted above is silent, so a future change thatbreaks the extension's precompilation would leave QA green while extension
coverage fell back to zero. A guard asserting the extension module actually
exists is in #264; it was pushed shortly after this PR merged and is not
included here.
Please ignore this PR until it has been reviewed by @ChrisRackauckas.