Skip to content

Support SciMLBase v3#62

Merged
kylebeggs merged 1 commit intoSciML:mainfrom
ChrisRackauckas-Claude:sciml-base-v3-compat
Apr 13, 2026
Merged

Support SciMLBase v3#62
kylebeggs merged 1 commit intoSciML:mainfrom
ChrisRackauckas-Claude:sciml-base-v3-compat

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Summary

Courtesy PR for the SciMLBase v3 release.

  • Extend SciMLBase compat to "2.77.0, 3.1".
  • Bump version to 0.2.4.
  • Add SciMLBase.derivative_discontinuity! overloads for OperatorSplittingIntegrator and SplitSubIntegrator in src/integrator.jl alongside the existing DiffEqBase.u_modified! methods, guarded by @static if isdefined(SciMLBase, :derivative_discontinuity!).
  • Update the SciMLBase.u_modified!(child, true) call in forward_sync_internal! (src/utils.jl:77) to dispatch to derivative_discontinuity! on v3+ via the same isdefined guard, so the call hits the direct method instead of the deprecated forward.

SciMLBase v3 renamed u_modified!derivative_discontinuity! with an @deprecate shim on the old name. Existing overloads still dispatch for legacy callers, but callers that have migrated to the new name would otherwise hit the generic error(...) fallback. The isdefined guards keep the code compiling on both v2 and v3.

Known limitation

Local tests cannot be run: Pkg.resolve() fails on any env containing SciMLBase 3.1 because OrdinaryDiffEq in the registry still pins RecursiveArrayTools ≤ 3.54. Expect CI to fail at the Pkg.add step until upstream bumps.

Reference pattern

Same @static if isdefined(SciMLBase, :derivative_discontinuity!) shim used in SciML/DiffEqCallbacks.jl#300.

cc @ChrisRackauckas

🤖 Generated with Claude Code

- Extend `SciMLBase` compat to `"2.77.0, 3.1"`.
- Bump version to 0.2.4.
- Add `SciMLBase.derivative_discontinuity!` overloads for
  `OperatorSplittingIntegrator` and `SplitSubIntegrator` alongside the
  existing `DiffEqBase.u_modified!` overloads, guarded by
  `@static if isdefined(SciMLBase, :derivative_discontinuity!)`.
- Update the `SciMLBase.u_modified!(child, true)` call in
  `forward_sync_internal!` to dispatch to `derivative_discontinuity!` on
  v3+ via the same `isdefined` guard, so it hits the direct method
  instead of the deprecated forward.

SciMLBase v3 renamed `u_modified!` → `derivative_discontinuity!` with an
`@deprecate` shim on the old name. Existing overloads still dispatch for
legacy callers, but callers using the new name would otherwise hit the
generic `error(...)` fallback. The `isdefined` guards keep the code
compiling on both SciMLBase v2 and v3.

Note: local tests cannot be run — `Pkg.resolve()` fails for any env
containing SciMLBase 3.1 because OrdinaryDiffEq in the registry still
pins `RecursiveArrayTools ≤ 3.54`. CI will reproduce the same resolution
error until upstream bumps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@kylebeggs kylebeggs merged commit a4bbfce into SciML:main Apr 13, 2026
3 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