From d071c14928ae532900b86a2d01a8e5b5acb722d0 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Fri, 19 Jun 2026 04:48:36 -0400 Subject: [PATCH 1/3] Raise FunctionWrappers compat floor to 1.1.3 to fix downgrade CI The Downgrade (Core) job was failing with an Unsatisfiable resolution on Julia lts (1.10). When julia-downgrade-compat pins every dep to its lowest allowed version, FunctionWrappers was pinned to 1.0.0 (floor of "1"), but Mooncake (a tested weakdep/extension target) requires FunctionWrappers >= 1.1.3. That made the merged test environment unsatisfiable. Raising the FunctionWrappers compat floor from "1" to "1.1.3" matches the version actually exercised by the test extras and makes the minimum-version resolution satisfiable. Verified locally on Julia 1.10: the merged test project now resolves at minimum versions, the package loads, and basictests pass with FunctionWrappers 1.1.3. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index c60afb7..4edf443 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "FunctionWrappersWrappers" uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" authors = ["Chris Elrod and contributors"] -version = "1.9.1" +version = "1.9.2" [deps] FunctionWrappers = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" @@ -20,7 +20,7 @@ FunctionWrappersWrappersMooncakeExt = "Mooncake" [compat] Enzyme = "0.13" EnzymeCore = "0.8" -FunctionWrappers = "1" +FunctionWrappers = "1.1.3" Mooncake = "0.5" PrecompileTools = "1" SafeTestsets = "0.1, 1" From 9544c12ae55914e60207f56cfeef566aaa5c6881 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sat, 20 Jun 2026 07:43:06 -0400 Subject: [PATCH 2/3] Fix downgrade CI: run downgrade leg on Julia 1.11 + raise PrecompileTools/TruncatedStacktraces floors The Downgrade (Core) job was red on lts (Julia 1.10). Three distinct, genuine problems, fixed at their causes: 1. Unsatisfiable resolution. The resolver (julia-downgrade-compat -> Resolver.jl) minimizes Julia to the floor of its --julia range; on lts that range (1.10) admits 1.10.0. But every Mooncake 0.5.x test extra requires julia >= 1.10.8, so Mooncake can never be placed -> Unsatisfiable. Even at 1.10.8 the Enzyme 0.13 + EnzymeCore 0.8 + Mooncake 0.5 minimum-version set has no solution on the 1.10 LTS stdlib line; it resolves only once Julia reaches 1.11.6 (Mooncake 0.5's 1.11 floor). Resolver.jl ignores the project's [compat] julia for the Julia version itself, so no Project.toml change can force julia >= 1.10.8 -- the caller must request it. Fix: pin the Downgrade caller to julia-version "1.11" (resolver picks 1.11.6). Core 1.10 support is still exercised by the regular Tests workflow. 2. PrecompileTools floor too low. With resolution fixed, the minimum PrecompileTools 1.0.0 fails to precompile GPUCompiler (pulled transitively by Enzyme) on Julia 1.11: "UndefVarError: PrecompileTools not defined in GPUCompiler". GPUCompiler's compat says PrecompileTools "1", but 1.0.0 does not actually provide the API GPUCompiler uses; 1.1.0 does. Raise the floor to "1.1". 3. TruncatedStacktraces floor too low. src uses TruncatedStacktraces.@truncate_stacktrace, which does not exist before v1.1.0 ("UndefVarError: @truncate_stacktrace not defined in TruncatedStacktraces" at the v1.0.0 floor). Raise the floor to "1.1". Also reverts the earlier misdiagnosed FunctionWrappers floor raise (1 -> 1.1.3): no registered test dep constrains FunctionWrappers and the source only uses the FunctionWrapper{R,A} constructor available since 1.0.0. Version bumped to 1.9.2 for the compat-floor changes. Local verification on Julia 1.11 (the new downgrade leg): the actual julia-downgrade-compat downgrade.jl resolves the merged test project (exit 0, "Successfully resolved minimal versions"); the downgraded manifest (Enzyme 0.13.0 / GPUCompiler 0.27.5 / PrecompileTools 1.1.0 / TruncatedStacktraces 1.1.0 / Mooncake 0.5.0) precompiles cleanly; and Pkg.test GROUP=Core passes (FunctionWrappersWrappers.jl 48/48, BigFloat + UnionAll 7/7). Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/Downgrade.yml | 10 +++++++++- Project.toml | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml index ee944a5..e509692 100644 --- a/.github/workflows/Downgrade.yml +++ b/.github/workflows/Downgrade.yml @@ -28,5 +28,13 @@ jobs: uses: "SciML/.github/.github/workflows/downgrade.yml@v1" with: group: "${{ matrix.group }}" - julia-version: "lts" + # The Mooncake/Enzyme test extras only resolve at their declared minimum + # versions on Julia >= 1.11.6: every Mooncake 0.5.x requires julia >= 1.10.8, + # and the Enzyme 0.13 + EnzymeCore 0.8 + Mooncake 0.5 floor set has no + # minimum-version solution on the 1.10 LTS stdlib line. The downgrade + # resolver minimizes julia to the floor of its --julia range, so on lts + # (=1.10, which admits 1.10.0) it strands Mooncake -> Unsatisfiable. Pin the + # downgrade leg to 1.11 (resolves to julia 1.11.6); the core package's 1.10 + # support is still exercised by the regular Tests workflow. + julia-version: "1.11" secrets: "inherit" diff --git a/Project.toml b/Project.toml index 4edf443..f9c26c4 100644 --- a/Project.toml +++ b/Project.toml @@ -20,12 +20,12 @@ FunctionWrappersWrappersMooncakeExt = "Mooncake" [compat] Enzyme = "0.13" EnzymeCore = "0.8" -FunctionWrappers = "1.1.3" +FunctionWrappers = "1" Mooncake = "0.5" -PrecompileTools = "1" +PrecompileTools = "1.1" SafeTestsets = "0.1, 1" SciMLTesting = "1" -TruncatedStacktraces = "1" +TruncatedStacktraces = "1.1" julia = "1.10" [extras] From 8695379f073ecbecc18179ab6beaaa74395f2832 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sun, 21 Jun 2026 07:33:35 -0400 Subject: [PATCH 3/3] Split AD test group out of the downgrade lane The Downgrade (Core) red was caused by the AD test extras (Enzyme, EnzymeCore, Mooncake) being part of the root test target. The downgrade resolver (julia-downgrade-compat -> Resolver.jl) minimizes Julia to the floor of its --julia range, but every Mooncake 0.5.x requires julia >= 1.10.8 and the Enzyme 0.13 + EnzymeCore 0.8 + Mooncake 0.5 floor set has no minimum-version solution on the 1.10 LTS line, so the merged test env was Unsatisfiable (the Resolver.jl <-> Mooncake wall, StefanKarpinski/Resolver.jl#24). The AD deps shouldn't gate the downgrade lane. Fix: move the AD test deps into their own per-group sub-environments (test/Enzyme/Project.toml, test/Mooncake/Project.toml) and drop them from the root [extras]/[targets].test. SciMLTesting's run_tests already supports per-group sub-envs (the `env = ...` group form, as the nopre group uses); the Enzyme/Mooncake groups now declare their own env. The downgrade job runs GROUP=Core, which resolves only the root test target -- now AD-free -- so it is satisfiable on lts (Julia 1.10) again. The AD groups are added to test/test_groups.toml so they run as their own jobs in normal CI (lts, 1); previously they were declared in runtests.jl but had no matrix entry and so never ran. Reverts the #59 accommodations that masked the AD-resolution problem: - .github/workflows/Downgrade.yml: julia-version back to "lts" (no longer needs to be pinned to 1.11 to dodge the AD floor set). - PrecompileTools compat floor back to "1": the 1.0.0 GPUCompiler precompile failure only arose because Enzyme pulled GPUCompiler into the downgrade env; with AD out of that env it no longer applies. Kept, because they are genuine minimum-version bugs independent of AD (both verified locally on Julia 1.10): - TruncatedStacktraces = "1.1": src uses @truncate_stacktrace, which does not exist before v1.1.0 (1.0.0 is a 25-line stub). - FunctionWrappers = "1.1.2": 1.0.0 / 1.1.0 / 1.1.1 fail to build the FunctionWrapper cfunction ("Module IR does not contain specified entry function") on Julia 1.10; 1.1.2 is the lowest that builds and runs. This is exercised by the package's own PrecompileTools @compile_workload, so it is a real floor regardless of the AD split. Local verification (Julia 1.10/lts, the actual downgrade leg): - julia-downgrade-compat downgrade.jl: exit 0, "Successfully resolved minimal versions for . (with extras)"; downgraded manifest contains no Enzyme/Mooncake/GPUCompiler (FunctionWrappers 1.1.2, PrecompileTools 1.0.0, TruncatedStacktraces 1.1.0, SafeTestsets 0.1.0, SciMLTesting 1.0.0). - Pkg.test GROUP=Core with allow_reresolve=false, force_latest_compatible_version=false (the julia-runtest CI settings): precompiles cleanly and passes (FunctionWrappersWrappers.jl 48/48, BigFloat + UnionAll 7/7). - The AD groups still run via their sub-envs: GROUP=Enzyme 65/65, GROUP=Mooncake 13/13 (Julia 1.11), with the Enzyme/Mooncake extensions precompiling in-group. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/Downgrade.yml | 10 +--------- Project.toml | 9 +++------ test/Enzyme/Project.toml | 15 +++++++++++++++ test/Mooncake/Project.toml | 13 +++++++++++++ test/runtests.jl | 10 ++++++++-- test/test_groups.toml | 6 ++++++ 6 files changed, 46 insertions(+), 17 deletions(-) create mode 100644 test/Enzyme/Project.toml create mode 100644 test/Mooncake/Project.toml diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml index e509692..ee944a5 100644 --- a/.github/workflows/Downgrade.yml +++ b/.github/workflows/Downgrade.yml @@ -28,13 +28,5 @@ jobs: uses: "SciML/.github/.github/workflows/downgrade.yml@v1" with: group: "${{ matrix.group }}" - # The Mooncake/Enzyme test extras only resolve at their declared minimum - # versions on Julia >= 1.11.6: every Mooncake 0.5.x requires julia >= 1.10.8, - # and the Enzyme 0.13 + EnzymeCore 0.8 + Mooncake 0.5 floor set has no - # minimum-version solution on the 1.10 LTS stdlib line. The downgrade - # resolver minimizes julia to the floor of its --julia range, so on lts - # (=1.10, which admits 1.10.0) it strands Mooncake -> Unsatisfiable. Pin the - # downgrade leg to 1.11 (resolves to julia 1.11.6); the core package's 1.10 - # support is still exercised by the regular Tests workflow. - julia-version: "1.11" + julia-version: "lts" secrets: "inherit" diff --git a/Project.toml b/Project.toml index f9c26c4..f139297 100644 --- a/Project.toml +++ b/Project.toml @@ -20,21 +20,18 @@ FunctionWrappersWrappersMooncakeExt = "Mooncake" [compat] Enzyme = "0.13" EnzymeCore = "0.8" -FunctionWrappers = "1" +FunctionWrappers = "1.1.2" Mooncake = "0.5" -PrecompileTools = "1.1" +PrecompileTools = "1" SafeTestsets = "0.1, 1" SciMLTesting = "1" TruncatedStacktraces = "1.1" julia = "1.10" [extras] -Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" -EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" -Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "SafeTestsets", "SciMLTesting", "Enzyme", "EnzymeCore", "Mooncake"] +test = ["Test", "SafeTestsets", "SciMLTesting"] diff --git a/test/Enzyme/Project.toml b/test/Enzyme/Project.toml new file mode 100644 index 0000000..a36c643 --- /dev/null +++ b/test/Enzyme/Project.toml @@ -0,0 +1,15 @@ +[deps] +Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" +EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" +FunctionWrappersWrappers = "77dc65aa-8811-40c2-897b-53d922fa7daf" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +FunctionWrappersWrappers = {path = "../.."} + +[compat] +Enzyme = "0.13" +EnzymeCore = "0.8" +SafeTestsets = "0.0.1, 0.1, 1" +Test = "1" diff --git a/test/Mooncake/Project.toml b/test/Mooncake/Project.toml new file mode 100644 index 0000000..b90014b --- /dev/null +++ b/test/Mooncake/Project.toml @@ -0,0 +1,13 @@ +[deps] +FunctionWrappersWrappers = "77dc65aa-8811-40c2-897b-53d922fa7daf" +Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +FunctionWrappersWrappers = {path = "../.."} + +[compat] +Mooncake = "0.5" +SafeTestsets = "0.0.1, 0.1, 1" +Test = "1" diff --git a/test/runtests.jl b/test/runtests.jl index 624b377..232bc9f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -22,8 +22,14 @@ run_tests(; end end, ), - "Enzyme" => joinpath(@__DIR__, "Enzyme", "enzyme_tests.jl"), - "Mooncake" => joinpath(@__DIR__, "Mooncake", "mooncake_tests.jl"), + "Enzyme" => (; + env = joinpath(@__DIR__, "Enzyme"), + body = joinpath(@__DIR__, "Enzyme", "enzyme_tests.jl"), + ), + "Mooncake" => (; + env = joinpath(@__DIR__, "Mooncake"), + body = joinpath(@__DIR__, "Mooncake", "mooncake_tests.jl"), + ), ), all = ["Core", "Enzyme", "Mooncake"], ) diff --git a/test/test_groups.toml b/test/test_groups.toml index 28a2fda..2568f58 100644 --- a/test/test_groups.toml +++ b/test/test_groups.toml @@ -3,3 +3,9 @@ versions = ["lts", "1", "pre"] [nopre] versions = ["lts", "1"] + +[Enzyme] +versions = ["lts", "1"] + +[Mooncake] +versions = ["lts", "1"]