Make the QA group scan all four package extensions - #193
Merged
ChrisRackauckas merged 1 commit intoAug 1, 2026
Merged
Conversation
ExplicitImports reads the `[extensions]` table out of `Project.toml`, but it
only checks an extension module that actually exists -- which requires the
extension's trigger package to be loaded. The QA environment loaded no
weakdeps, so none of the four extensions were being checked at all.
Add EnzymeCore, ForwardDiff, ReverseDiff and SparseConnectivityTracer to
`test/qa/Project.toml` and load them in `qa.jl`, which brings all four
extensions under the ExplicitImports checks.
Two source fixes for findings that had a public spelling:
* `PreallocationToolsForwardDiffExt` relied on implicit imports for
`ForwardDiff`, `ArrayInterface`, `@setup_workload` and
`@compile_workload`; these are now explicit. `using Adapt` is dropped
because the extension never used it (Adapt is only used in `src/`).
* `Core.apply_type(wrapper, params...)` is spelled `wrapper{params...}`,
which is the same operation via public syntax.
The remaining findings are names that are genuinely non-public at their owner
with no public equivalent (Enzyme's custom-rule interface, the AD backends'
dual/tracer/tracked-array types, `Base.typename`), so they are added to the
per-check `ignore` lists with a comment naming the owner in each case.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
ChrisRackauckas
marked this pull request as ready for review
August 1, 2026 08:51
Member
Author
Core group status (informational)I also ran Both runs ( Every other Core testset passed on this branch: Developer Interface (16), DiffCache Dispatch (82 pass / 10 broken), DiffCache ODE tests (7), DiffCache Resizing (64). |
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.
Please ignore this PR until it has been reviewed by @ChrisRackauckas.
Why
SciMLTesting.run_qaruns ExplicitImports' checks on the package module.ExplicitImports does know about extensions — it reads the
[extensions]table outof
Project.toml— but it only checks an extension module that actually exists:An extension module only comes into existence once its trigger weakdep is loaded, and
the QA environment loaded none of them. Today no PreallocationTools extension is
scanned by QA at all. The fix is to put the weakdeps in
test/qa/Project.tomlandusingthem intest/qa/qa.jlbeforerun_qa.Coverage
All four weakdeps are pure Julia and resolve cleanly, so all four extensions are now
scanned — nothing is left out:
PreallocationToolsEnzymeCoreExtPreallocationToolsForwardDiffExtPreallocationToolsReverseDiffExtPreallocationToolsSparseConnectivityTracerExt[compat]entries intest/qa/Project.tomlmirror the root package's bounds(
EnzymeCore = "0.8",ForwardDiff = "0.10.38, 1.0.1",ReverseDiff = "1.16",SparseConnectivityTracer = "1").Fixed in the extension source (not ignored)
Two findings had a public spelling, so the source was fixed rather than ignored:
no_implicit_imports—PreallocationToolsForwardDiffExtdid bareusing ForwardDiff/using ArrayInterface/using PrecompileToolsand thenreferred to
ForwardDiff.Dual,ArrayInterface.restructure,@setup_workloadand@compile_workload. These are nowusing ForwardDiff: ForwardDiff,using ArrayInterface: ArrayInterfaceandusing PrecompileTools: @setup_workload, @compile_workload.using Adaptis dropped: the extension never referenced Adapt (it is used onlyin
src/PreallocationTools.jl), so keeping it as an explicit import would havetripped
no_stale_explicit_imports.all_qualified_accesses_are_public:Core.apply_type— replaced withwrapper{new_parameters...}, which is exactly the same operation spelled with publicsyntax (
Core.apply_typeis the intrinsic behindT{...}).Ignore entries added, with justification
Every remaining finding is a name that is genuinely non-public at its owner and has no
public equivalent. Each is grouped under a comment naming the owner in
qa.jl.all_explicit_imports_are_public::EnzymeRules:AbstractTracer,:DualTracerSparsityDetector,TracerLocalSparsityDetector,jacobian_sparsity,hessian_sparsity,jacobian_eltype,hessian_eltype,jacobian_buffer,hessian_buffer. These two types are what aget_tmpmethod must dispatch on for sparsity detection to reach the cache.all_qualified_accesses_are_public::forward,:augmented_primal,:reverseEnzymeCore.EnzymeRulesfunction ... endstubs and not exported. Adding methods to them is the documented way to write a custom rule.:Dual,:pickchunksizeDiffResults.Dualis the type every dual-cache method dispatches on;pickchunksizeis the chunk heuristic the cache sizing mirrors.:TrackedArrayDiffResults;TrackedArrayis the type theLazyBufferCachemethod keys on.:typenameDataType'sUnionAllwrapper so its type parameters can be substituted. Base offers no public equivalent.No check was disabled, and no
@test_broken/explicit_imports = falseescape hatchwas used.
Local verification
GROUP=QA julia --project=. -e 'using Pkg; Pkg.test()'on this branch (Julia 1.12):(For reference, the same command with the weakdeps added but before the fixes reported
24 passed, 3 errored, which is the previously-invisible extension debt this PR paysoff.)
The
Core.apply_type→wrapper{...}rewrite was additionally checked directly againstreplace_type_parameterforFloat64,Complex{Float64},Vector{Complex{Float64}}and
String, all unchanged.test/qa/Manifest.tomlis a local build artifact and is not committed (Manifest.tomlis already in
.gitignore). Runic was run on both touched files.🤖 Generated with Claude Code
https://claude.ai/code/session_01Yb5kCpT5SRzTrhppKSh1n7