Skip to content

Assert the StaticArrays extension actually loaded in QA - #264

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:qa-extension-load-guard
Aug 1, 2026
Merged

Assert the StaticArrays extension actually loaded in QA#264
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:qa-extension-load-guard

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Follow-up to #263, which was merged before this guard was pushed.

Why

The extension scan that #263 turned on can be silently lost again.
ExplicitImports skips an extension whose module does not exist:

ext_mod = Base.get_extension(mod, Symbol(ext))
ext_mod === nothing && continue

That skip is silent — every check then reports a clean pass. So if a future
change breaks ExponentialUtilitiesStaticArraysExt's precompilation, or the
using StaticArrays line in test/qa/qa.jl gets dropped, QA goes green while
extension coverage quietly falls back to zero, which is exactly the state #263
just fixed.

What changed

Assert the extension module exists rather than trusting a green run_qa:

@testset "Extensions loaded" begin
    @test Base.get_extension(
        ExponentialUtilities, :ExponentialUtilitiesStaticArraysExt
    ) !== nothing
end

Verified locally that this actually discriminates rather than being vacuously
true: in a session with only using ExponentialUtilities, Base.get_extension
returns nothing; after using StaticArrays it returns the module.

Local verification

GROUP=QA julia --project=. -e 'using Pkg; Pkg.test()' on this branch:

Test Summary: | Pass  Broken  Total     Time
QA/qa.jl      |   22       2     24  3m30.7s
     Testing ExponentialUtilities tests passed

That is 22 passing versus 21 on master, the difference being the new guard. The
2 broken are the pre-existing broken = true markers in the AllocCheck testset,
untouched here. No package source is changed by this PR, only test/qa/qa.jl.


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

ExplicitImports silently skips an extension whose module does not exist:
`Base.get_extension` returns `nothing` and the checks report a clean pass. If
the extension's precompilation later breaks, QA would go green while extension
coverage silently dropped back to zero. Assert the module exists instead of
trusting a green run_qa.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 1, 2026 08:48
@ChrisRackauckas
ChrisRackauckas merged commit ed2d55a into SciML:master Aug 1, 2026
21 checks passed
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