Skip to content

Migrate AD backends to a group env (test/Extensions/Project.toml)#552

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:migrate-ad-group-env
Jul 4, 2026
Merged

Migrate AD backends to a group env (test/Extensions/Project.toml)#552
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:migrate-ad-group-env

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

What

Moves the heavy optional AD/analysis backends Mooncake, Zygote, and SparseConnectivityTracer out of the root package's old-style [extras]/[targets].test and into a dedicated group env test/Extensions/Project.toml — the group whose test files (test/Extensions/{mooncake,zygote,sparseconnectivitytracer}_tests.jl) actually using them. All three are used only in test/Extensions/*.jl.

Why

With the backends in the root test target, the root/Core Downgrade lane floor-resolves the Mooncake/Zygote joint dependency graph (the well-known Mooncake+Zygote joint-floor wall). Moving them into a group env means the root project no longer even attempts that joint floor-check.

Verified with the jdc-52 downgrade harness on Julia 1.12.6 (fresh depot each run):

weakdep extensions floor-checked Manifest-{Mooncake,Zygote,SparseConnectivityTracer}.toml written?
BEFORE (master) 7: ChainRulesCore, Makie, Mooncake, Optim, SparseConnectivityTracer, Symbolics, Zygote yes
AFTER (this branch) 4: ChainRulesCore, Makie, Optim, Symbolics no

Both runs exit 0; the base project still Successfully resolved after the move.

How it stays correct

  • All three moved packages remain [weakdeps] (they gate DataInterpolationsMooncakeExt / DataInterpolationsSparseConnectivityTracerExt; Zygote is a declared weakdep), so their root [compat] entries are kept — no dangling-compat resolver error. No pure test-only extra was moved, so no [compat] deletion was needed.
  • The cross-backend AD tests are unchanged (not split per backend).
  • The SciMLTesting folder harness auto-activates the group env by folder discovery, so test/runtests.jl (run_tests()) needs no wiring change.

Validation (all run locally on Julia 1.12.6)

  • Downgrade BEFORE/AFTER as above — both exit 0; AFTER drops the three from the floor-check set and writes none of their manifests.
  • Group env resolve: julia --project=test/Extensions -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()' → exit 0; resolves Mooncake 0.5.36, Zygote 0.7.11, SparseConnectivityTracer 1.2.2, ForwardDiff 1.4.1; DataInterpolationsMooncakeExt + DataInterpolationsSparseConnectivityTracerExt precompile.
  • GROUP=Core Pkg.test (root env, without the backends): passes — extrapolation 106/106, interface 28/28, interpolation 17412 pass / 5 pre-existing broken, parameter 20/20; "Testing DataInterpolations tests passed".

Please ignore until reviewed by @ChrisRackauckas.

Move the heavy optional AD/analysis backends Mooncake, Zygote, and
SparseConnectivityTracer out of the root package's old-style
[extras]/[targets].test and into a dedicated group env
test/Extensions/Project.toml (the group whose test files actually
`using` them). All three are used only in test/Extensions/*.jl.

This stops the root/Core Downgrade lane from floor-resolving the
Mooncake/Zygote joint dependency graph: the jdc-52 downgrade harness
drops these three from its "Independently downgrading N weakdep
extension(s)" set (7 -> 4) and no longer writes Manifest-Mooncake,
Manifest-Zygote, or Manifest-SparseConnectivityTracer, while the base
project still resolves. The cross-backend AD tests are unchanged; the
SciMLTesting folder harness auto-activates the group env, so
runtests.jl (run_tests()) needs no wiring.

All three moved packages remain [weakdeps] (they gate extensions), so
their root [compat] entries are kept (no dangling-compat resolver
error). No package is a pure test-only extra here, so no [compat]
deletion is needed.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review July 4, 2026 11:59
@ChrisRackauckas ChrisRackauckas merged commit 7defb4d into SciML:master Jul 4, 2026
15 of 18 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