Skip to content

Relax Zygote compat from 0.7.10 to 0.7#532

Merged
ChrisRackauckas merged 1 commit intoSciML:masterfrom
ChrisRackauckas-Claude:relax-zygote-compat
Jan 26, 2026
Merged

Relax Zygote compat from 0.7.10 to 0.7#532
ChrisRackauckas merged 1 commit intoSciML:masterfrom
ChrisRackauckas-Claude:relax-zygote-compat

Conversation

@ChrisRackauckas-Claude
Copy link
Contributor

Summary

  • Relaxes Zygote version constraint from 0.7.10 to 0.7
  • This allows any Zygote 0.7.x version to be used

Rationale

There's a typo bug in Julia's base/meta.jl (line 412) where spvals is used instead of static_param_values. This bug causes an UndefVarError: spvals not defined in Base.Meta error when Zygote 0.7.10 is used to differentiate through functions that use @cfunction with type parameters (like Cubature.jl's integration routines).

By relaxing the constraint to allow Zygote 0.7.0-0.7.9, downstream packages like NeuralPDE.jl can work around this bug until Julia fixes the typo in base.

This is part of a series of PRs to relax Zygote constraints across the SciML ecosystem:

  • SciMLBase.jl PR #1220 (merged)

🤖 Generated with Claude Code

This allows using any Zygote 0.7.x version, which is needed to work around
a Julia base bug (typo in Base.Meta.partially_inline!) that is triggered
by Zygote 0.7.10 when differentiating through @cfunction with type parameters.

The specific error occurs in Julia's base/meta.jl:412 where `spvals` is used
instead of `static_param_values`, causing an "UndefVarError: `spvals` not defined"
error when using Zygote with packages like Cubature.jl.

By relaxing the constraint to allow Zygote 0.7.0-0.7.9, downstream packages
can avoid this bug until Julia fixes the typo in base.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas merged commit 0bae6c5 into SciML:master Jan 26, 2026
26 of 27 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.

3 participants