Repository navigation
Allow LinearSolve v4 and v5 (compat bump) - #550
Merged
ChrisRackauckas merged 1 commit intoJul 11, 2026
Merged
ChrisRackauckas merged 1 commit into
ChrisRackauckas merged 1 commit into
Conversation
Sundials only does `import LinearSolve` (to trigger initialization /
extension loading); it does not use any LinearSolve.jl solver API
(LinearProblem/init/solve!/LinearCache) nor read `.cache` off a solve
result, so no code changes are required for LinearSolve 4.x/5.x — the
4->5 `LinearSolution.cache` removal does not affect Sundials.
Widen the LinearSolve compat from "3.40.0" (3.x only) to "3.40.0, 4, 5"
so downstream stacks (e.g. NonlinearSolve's Wrappers CI) can move to
LinearSolve 4/5. SciMLBase compat ("3.35") already admits what
LinearSolve 4.3+/5 require (SciMLBase 3.32+), so no SciMLBase change is
needed.
Co-Authored-By: Claude Fable 5 <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Widen Sundials'
LinearSolvecompat from"3.40.0"(LinearSolve 3.x only) to"3.40.0, 4, 5", so it admits LinearSolve 4.x and 5.x in addition to 3.x. This unblocks the SciML stack's move to LinearSolve 4/5 (e.g. NonlinearSolve's Wrappers CI can't resolve when a downstream requires LinearSolve ≥ 4 while Sundials caps it at 3).What LinearSolve API does Sundials use? → Pure compat bump, no code changes
Sundials.jl's only use of LinearSolve.jl is:
in
src/Sundials.jl. A full grep ofsrc/andtest/confirms Sundials does not touch any LinearSolve solver API — noLinearProblem, noinit/solve!on aLinearCache, no*Factorizationalgorithms, noLinearSolveFunction. All theLinearSolversymbols in the source are Sundials' own internal SUNLinearSolver type parameters (Dense,Band,SPGMR,KLU, …), unrelated to LinearSolve.jl. Sundials' linear solves go through the Sundials C library'sSUNLinearSolverbindings, not LinearSolve.jl.Because of this, the known breaking changes across LinearSolve majors do not affect Sundials:
cachefield of the returnedLinearSolution(solve!(cache)'s result no longer carries.cache) — the migration OrdinaryDiffEq did in Stop threading LinearSolve cache through solution return values OrdinaryDiffEq.jl#3875. Sundials never reads.cacheoff a solve result (verified: zero.cachereads insrc/), so this change is a no-op here.Hence this is a pure compat bump — no source changes required. The only diff is
Project.toml(LinearSolvecompat + a patch version bump6.4.0 → 6.4.1).SciMLBase: LinearSolve
4.3–5requireSciMLBase = "3.32"(i.e. ≥ 3.32). Sundials already pinsSciMLBase = "3.35"(≥ 3.35), a subset — so no SciMLBase widening is needed.Local verification (Julia 1.10.11)
All runs use a stiff Robertson ODE via
CVODE_BDF()plus a representative core subset of Sundials' own test suite.LinearSolve 3.x (regression check — highest 3.x resolvable with SciMLBase 3.35 is 3.87.0)
No regression. (Note: with the compat floor
3.40.0, the resolver already selected 3.87.0 both before and after this change — behavior on 3.x is unchanged.)LinearSolve 4.3.0 (added, registered)
Core test suite (Roberts CVODE/IDA/ARKStep, Kinsol, common_interface CVODE/IDA/ARKODE/Jacobians/Preconditioners): all pass (66/66 test items; the lone "error" in one batch run was a scratch-env missing a direct dep declaration for
SciMLBase/DiffEqBase, not a LinearSolve issue — re-runningcommon_interface/ida.jlwith those declared passes).LinearSolve 5.0.0 (added, registered)
Upstream note for LinearSolve 5 (not a Sundials issue)
Resolving Sundials + LinearSolve 5.0.0 against the current registry fails — but the block is upstream of Sundials, not caused by Sundials' compat.
NonlinearSolveBase(which Sundials depends on for KINSOL) ships aNonlinearSolveBaseLinearSolveExtwhose weak-compat caps LinearSolve at 4:NonlinearSolveBase 2.32–2→ weak_compatLinearSolve = "3.48.0 - 4"LinearSolve = "3.48, 4".So no registered package in the NonlinearSolve stack admits LinearSolve 5 yet — this is the exact ecosystem-wide ceiling this PR is meant to help lift. To prove Sundials' own code is LinearSolve-5-clean, the LinearSolve 5.0.0 verification above was run with a one-line local patch to NonlinearSolveBase's weak-compat (
"3.48, 4"→"3.48, 4, 5") — the same one-line bump that needs to land upstream in NonlinearSolveBase. With that in place, Sundials resolves, precompiles, and solves on LinearSolve 5.0.0. Once NonlinearSolveBase releases LinearSolve-5 weak-compat, Sundials picks up 5.x automatically with no further Sundials change thanks to this compat widening.Impact
Unblocks the SciML stack's move to LinearSolve 4/5 (e.g. NonlinearSolve wrappers CI): downstream packages that require LinearSolve ≥ 4 can now co-resolve with Sundials.
Note: This PR should be ignored until reviewed by @ChrisRackauckas.
🤖 Generated with Claude Code