Migrate to SciMLBase v3 / DiffEqBase v7 / RecursiveArrayTools v4#595
Conversation
Replace removed `DiffEqBase.DESolution` type alias (dropped in
SciMLBase v3) with the concrete `SciMLBase.AbstractTimeseriesSolution`
supertype used by `ODESolution` and friends. Switch the successful-retcode
check to `SciMLBase.successful_retcode` directly now that the
`DiffEqBase.SciMLBase` re-export namespace is no longer guaranteed.
Fix a latent RecursiveArrayTools v4 breakage in the DataDrivenDMD
`linear_forced` test: `length(sol_cont)` previously returned the number
of timesteps, but under RAT v4 `AbstractVectorOfArray <: AbstractArray`
it returns `prod(size(sol))` (total elements). Switch to
`length(sol_cont.t)` which is the stable way to get the timestep count.
Widen `Project.toml` compats across the main package and every
`lib/*/Project.toml`:
- `DiffEqBase = "6.211, 7"` (root)
- `SciMLBase = "2.155, 3"` (root; new direct dep to access
`AbstractTimeseriesSolution`)
- `OrdinaryDiffEqTsit5 = "1, 2"` (test extra)
- `OrdinaryDiffEq = "6, 7"` in DataDrivenDMD / DataDrivenSparse /
DataDrivenLux test targets
- Pin subpackage `DataDrivenDiffEq` compat to `"1.14"` so they pull in
this release
Bumps:
- DataDrivenDiffEq: 1.13.0 -> 1.14.0
- DataDrivenDMD: 0.1.2 -> 0.1.3
- DataDrivenSparse: 0.1.3 -> 0.1.4
- DataDrivenSR: 0.1.3 -> 0.1.4
- DataDrivenLux: 0.2.2 -> 0.2.3
Supersedes Dependabot PR SciML#594, which only widened the `DiffEqBase`
compat without handling the code-level breaking changes.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Local test results (Julia 1.12.6)Running under the currently resolvable Manifest (DiffEqBase 6.218, SciMLBase 2.155.0, RecursiveArrayTools 3.54, OrdinaryDiffEqCore 3.33 — the ecosystem hasn't actually cut the v7/v3/v4 releases yet; Core tests — PASSED: DataDrivenDMD tests — PASSED: The DataDrivenSparse / DataDrivenSR / DataDrivenLux and the nopre / JET suites are still in progress locally — I'll rely on CI for those since DataDrivenSR and DataDrivenLux have large test deps that dominate total wallclock. Core + DMD cover the only two sites in this repo that touch |
Summary
Full migration to the SciMLBase v3 / DiffEqBase v7 / RecursiveArrayTools v4 ecosystem. Supersedes the Dependabot PR #594, which only widened the
DiffEqBasecompat inProject.tomlwithout handling the code-level breaking changes.Breaking changes handled
SciMLBase v3 — removed
DESolutiontype aliassrc/problem/type.jl:where {T <: DiffEqBase.DESolution}→where {T <: SciMLBase.AbstractTimeseriesSolution}src/problem/set.jl: same rename in theDataDrivenDatasetconstructor dispatching on aVararg{T, N}of solutionssrc/DataDrivenDiffEq.jl: add an explicitusing SciMLBase: SciMLBase, AbstractTimeseriesSolution(and makeSciMLBasea direct dep inProject.toml) becauseDiffEqBase.SciMLBaseis no longer a guaranteed qualified namespace under DiffEqBase v7DiffEqBase.SciMLBase.successful_retcode(sol)→SciMLBase.successful_retcode(sol)for the same reasonRecursiveArrayTools v4 —
AbstractVectorOfArray <: AbstractArraylib/DataDrivenDMD/test/linear_forced.jl:length(sol_cont)(used to return number of timesteps) now returnsprod(size(sol)). Fixed tolength(sol_cont.t), which is the stable way to get the timestep count across RAT v3 and v4.Audit results (per category)
Searched
src/,lib/*/src/,lib/*/test/, andtest/for every pattern listed in the migration guide:SciMLBase v3 renames:
u_modified!,DEAlgorithm,DEProblem,syms/paramsyms/indepsym,symbol_to_ReturnCode,destats,sol.x,.lb/.ub,.minimizer,.minimum,tuples()/intervals(),IntegratorTuples,TimeChoiceIterator,QuadratureProblem— no hits. OnlyDESolution(2 sites, both fixed).DiffEqBase v7 removals:
fastpow,concrete_solve,RECOMPILE_BY_DEFAULT,DEStats,has_destats— no hits.NullParameters,isinplace,isdiscreteare still re-exported from DiffEqBase v7, soDiffEqBase.NullParameters/DiffEqBase.isinplace(sol.prob.f)/isdiscrete(sol.alg)insrc/problem/type.jlcontinue to work unchanged.RecursiveArrayTools v4:
length(sol)(1 hit — fixed),first(sol)/last(sol)/iterate(sol)/eachindex(sol)/maximum(sol)/minimum(sol)/map(f, sol)— no hits.Array(sol)still returns a matrix with unchanged shape (RAT v4 preservesBase.Array(::AbstractVectorOfArray)), so the 6Array(sol)/Array(sol(t, Val{1}))sites insrc/problem/type.jland test files need no code change.sol[:, :]andsize(sol)in the docs examples likewise preserve their semantics under RAT v4.Bool kwargs banned in v7:
verbose=true/false,alias=true/false,autodiff=true/false,lazy=true/false— no hits in src/ or test/.Algorithm-struct / controller refactor:
chunk_size,diff_type,standardtag,gamma,beta1,qmin,qoldinit,EEst,qold— no hits.Ensemble API (
prob_func/output_funcnew signature): no hits. DataDrivenDiffEq does not useEnsembleProblem.Package scope reduction (
using OrdinaryDiffEqonly default solvers): tests useTsit5and the project test target already pullsOrdinaryDiffEqTsit5; the lib test targets pull the umbrellaOrdinaryDiffEqwhich still reexports the default set.Per-subpackage summary
src/(main package): 2 type-alias renames + 1 namespace fix +SciMLBaseadded as direct deplib/DataDrivenDMD/: 1 test fix (length(sol)→length(sol.t)); compat widened; no src changes — it doesn't touchDiffEqBase/SciMLBasedirectlylib/DataDrivenSparse/: no code changes; compat widenedlib/DataDrivenSR/: no code changes; compat widenedlib/DataDrivenLux/: no code changes; compat widenedCompat widening
DiffEqBase"6""6.211, 7"SciMLBase"2.155, 3"(now direct)OrdinaryDiffEqTsit5"1""1, 2"lib/*OrdinaryDiffEq"6, 7"lib/*DataDrivenDiffEq"1""1.14"Version bumps
DataDrivenDiffEq: 1.13.0 → 1.14.0DataDrivenDMD: 0.1.2 → 0.1.3DataDrivenSparse: 0.1.3 → 0.1.4DataDrivenSR: 0.1.3 → 0.1.4DataDrivenLux: 0.2.2 → 0.2.3Test plan
Local
Pkg.test()run in progress on Julia 1.12.6 against the currently resolvable Manifest (which still holds at DiffEqBase 6.218 / SciMLBase 2.155 / RAT 3.54 due to the wider ecosystem transition —ImplicitDiscreteSolveandOrdinaryDiffEqCoreare the remaining blockers upstream for the v7/v3/v4 resolution). The compat widening is still the right thing: once those upstream packages release, this package will pick up v7/v3/v4 automatically, and the code changes above are forward-compatible with v3/v4 semantics.Note on Dependabot PR #594
PR #594 only widens
DiffEqBase = "6, 7.0"in the rootProject.toml. Taken on its own it would leave the twoDiffEqBase.DESolutiontype-parameter constraints as dead code (the alias is gone in SciMLBase v3), so theDataDrivenProblem(::DESolution)constructor and the solution-VarargDataDrivenDatasetconstructor would silently stop dispatching once the stack upgrades to SciMLBase v3. This PR fixes that, also covers thelength(sol)RAT v4 regression in the DMD test, widens the subpackage compats consistently, and bumps all five versions.Close #594 in favor of this PR.
🤖 Generated with Claude Code