Core: declare SparseArrays in [extras] so the test target survives weakdep promotion - #4014
Merged
ChrisRackauckas merged 1 commit intoJul 25, 2026
Conversation
`SparseArrays` is in the `test` target but was only listed under
`[weakdeps]`. That resolves fine normally, but julia-downgrade-compat
promotes a weak dependency to a real one when some other package in the
merged project requires it — here OrdinaryDiffEqNonlinearSolve:
[ Info: Promoting root weak dependency required by
OrdinaryDiffEqNonlinearSolve: SparseArrays
Promotion moves the entry out of `[weakdeps]` and into `[deps]`, leaving
the `test` target pointing at a name that is in neither `[extras]` nor
`[weakdeps]`, so `Pkg.test` aborts before running anything:
`SparseArrays` declared as a `test` dependency,
but no such entry in `extras` or `weakdeps`
Listing it in `[extras]` too gives the target a UUID that survives the
promotion. Both spellings resolve on 1.10/1.11/1.12: pre-promotion
(`[weakdeps]` + `[extras]`) and post-promotion (`[deps]` + `[extras]`).
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
ChrisRackauckas
marked this pull request as ready for review
July 25, 2026 03:56
This was referenced Jul 25, 2026
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.
This PR should be ignored until reviewed by @ChrisRackauckas.
The failure
Downgrade Sublibraries / test (lib/OrdinaryDiffEqCore)aborts before a singletest runs:
Why
SparseArraysis inlib/OrdinaryDiffEqCore'stesttarget but was listedonly under
[weakdeps]. That resolves fine normally —Pkglooks the testtarget up in
[extras]and[weakdeps]. But julia-downgrade-compat promotesa weak dependency to a real one when another package in the merged project
needs it, and in this job it does exactly that:
Promotion moves the entry out of
[weakdeps]and into[deps]. Thetesttarget is then pointing at a name that is in neither[extras]nor[weakdeps], soPkg.testerrors out during test-environment generation.This is the only Project.toml in the repo with a test-target name that lives in
[weakdeps]but not[extras]:The fix
Also list
SparseArraysin[extras].[weakdeps]and[extensions]areuntouched, so
OrdinaryDiffEqCoreSparseArraysExtstill loads conditionally —the entry only gives the test target a UUID that survives promotion.
Verification
1. Reproduced the CI failure locally by replaying the promotion step
(
SparseArrays:[weakdeps]→[deps]) on unmodified master:2. Same promotion, with this patch — the abort is gone and the test env builds:
3. Normal (un-promoted) path still green — full Core group on Julia 1.11,
matching the CI job's
ODEDIFFEQ_TEST_GROUP=Core:The extension still precompiles, confirming the
[weakdeps]role is intact.4. Both spellings resolve on every supported Julia — a minimal package with
SparseArraysin[weakdeps]+[extras](normal) and in[deps]+[extras](post-promotion) passes
Pkg.teston 1.10, 1.11 and 1.12.Relation to other PRs
#4012 includes this same one-line change bundled with two unrelated fixes; this
PR isolates it.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TPHRh64BLfoXSzQ3AxKNwC