Skip to content

Release 5.4.0 so the ForwardDiff extension issquare fix ships - #1131

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:agent/release-issquare-fix
Aug 1, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:agent/release-issquare-fix

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Please ignore this PR until it has been reviewed by @ChrisRackauckas.

Problem

The newest registered LinearSolve, v5.3.0, is broken against SciMLBase >= 3.40.0. Any solve of a LinearProblem with ForwardDiff.Dual entries throws:

ERROR: UndefVarError: `issquare` not defined in `LinearSolveForwardDiffExt`
Hint: a global variable of this name also exists in SciMLOperators.
Stacktrace:
 [1] solve(::LinearProblem{Nothing, true, Matrix{ForwardDiff.Dual{...}}, ...}, ::Nothing)
   @ LinearSolveForwardDiffExt ~/.julia/packages/LinearSolve/Jvqzc/ext/LinearSolveForwardDiffExt.jl:335

Root cause: LinearSolveForwardDiffExt used issquare unqualified. It resolved only because using SciMLBase inside the extension pulled it in via SciMLBase's @reexport using SciMLOperators. SciMLBase v3.40.0 removed that re-export (it now goes through SciMLOperators as the owner of the operator API), so the name disappeared from the extension's scope.

This is already fixed on master by f1908b9 (#1125), which adds using SciMLOperators: issquare to the extension. The problem is that master still carries version = "5.3.0" — the same version already in the General registry — so the fix is not installable by anyone.

What this PR does

Bumps the version to 5.4.0 so the fix can be registered. Minor rather than patch because master has also gained the TriangularSolve-backed LinearSolveRecursiveFactorizationExt (new weakdep + extension trigger) and the SupernodalLU work since v5.3.0.

Verification

Minimal reproduction (Julia 1.12.4):

using LinearSolve, ForwardDiff
A = [ForwardDiff.Dual(2.0, 1.0) 1.0; 1.0 3.0]
b = [ForwardDiff.Dual(1.0, 0.0), 2.0]
solve(LinearProblem(A, b))
  • LinearSolve v5.3.0 (registered) + SciMLBase v3.41.0 -> UndefVarError: issquare not defined in LinearSolveForwardDiffExt
  • LinearSolve v5.3.0 (registered) + SciMLBase v3.39.1 pinned -> works (Dual{Nothing}(0.2,-0.12), Dual{Nothing}(0.6,0.04)), confirming SciMLBase 3.40.0 is the trigger
  • LinearSolve master (this branch) + SciMLBase v3.41.0 -> works, same values

test/Core/forwarddiff_overloads.jl run against this branch with SciMLBase v3.41.0 passes (exit code 0), including ForwardDiff square-system initialization, DualLinearCache reuse/setu!/partials-validity, sparse, PureKLU and SupernodalLU dual cases.

Downstream impact: this is what makes SciML/PreallocationTools.jl test/core_nesteddual.jl error on unmodified master today (DiffCache Nested Duals), since it solves stiff ODEs under nested ForwardDiff.

Follow-up worth considering

v5.3.0 is broken in place for every user who resolves SciMLBase >= 3.40. A retroactive [SciMLBase] compat cap of 3.39 on LinearSolve 5.3.0 in the General registry would stop new installs from landing on the broken combination.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Yb5kCpT5SRzTrhppKSh1n7

LinearSolve 5.3.0 is the newest registered version and its ForwardDiff
extension is broken against SciMLBase >= 3.40: SciMLBase 3.40.0 dropped
`@reexport using SciMLOperators`, which is where
LinearSolveForwardDiffExt had been picking up `issquare`. Any
`solve(::LinearProblem{...Dual...})` on that combination throws
`UndefVarError: issquare not defined in LinearSolveForwardDiffExt`.

f1908b9 ("Import issquare from its owner in ForwardDiff extension",
SciML#1125) fixed it on master, but master still carries version 5.3.0, so
the fix is not installable. Bump to 5.4.0 (minor, since master also
gained the TriangularSolve-backed RecursiveFactorization extension and
the SupernodalLU work since 5.3.0) to get it registered.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 1, 2026 09:16
@ChrisRackauckas
ChrisRackauckas merged commit 89e3c4a into SciML:main Aug 1, 2026
12 of 15 checks passed
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Downstream confirmation: SciML/PreallocationTools.jl at ac5aeb9 (unmodified master), Julia 1.12.4, GROUP=Core julia --project=. -e "using Pkg; Pkg.test()".

Before (registered LinearSolve v5.3.0 + SciMLBase v3.41.0):

DiffCache Nested Duals: Error During Test
  LoadError: UndefVarError: `issquare` not defined in `LinearSolveForwardDiffExt`
Test Summary:          | Pass  Error  Total     Time
DiffCache Nested Duals |    2      1      3  2m18.7s
ERROR: Package PreallocationTools errored during testing

After (same checkout, Pkg.develop of this branch, SciMLBase v3.41.0), whole Core group green:

Test Summary:       | Pass  Total  Time
Developer Interface |   16     16  4.1s
Test Summary:      | Pass  Broken  Total   Time
DiffCache Dispatch |   82      10     92  16.3s
Test Summary:       | Pass  Total      Time
DiffCache ODE tests |    7      7  14m35.1s
Test Summary:      | Pass  Total  Time
DiffCache Resizing |   64     64  5.9s
Test Summary:          | Pass  Total     Time
DiffCache Nested Duals |    4      4  7m15.7s
Test Summary:              | Pass  Total   Time
DiffCache Sparsity Support |    4      4  20.6s
Test Summary:                           | Pass  Total  Time
DiffCache with SparseConnectivityTracer |   10     10  7.9s
Test Summary:  | Pass  Total     Time
Enzyme Support |   26     26  4m26.6s
Test Summary:   | Pass  Total  Time
LazyBufferCache |    2      2  0.2s
Test Summary:          | Pass  Total   Time
GeneralLazyBufferCache |   11     11  13.0s
Test Summary:                   | Pass  Total  Time
Zero, Copy, and Fill Dispatches |   64     64  3.2s
Test Summary:               | Pass  Total  Time
Allocation Regression Tests |   27     27  3.4s
     Testing PreallocationTools tests passed

(times are inflated; the box was running ~100 concurrent Julia jobs)

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.

2 participants