Skip to content

Remove unused ForwardDiff dependency (v1.0.1)#63

Merged
ChrisRackauckas merged 1 commit into
mainfrom
remove-forwarddiff-dep
Jun 10, 2026
Merged

Remove unused ForwardDiff dependency (v1.0.1)#63
ChrisRackauckas merged 1 commit into
mainfrom
remove-forwarddiff-dep

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Collaborator

Note: this PR should be ignored until reviewed by @ChrisRackauckas.

ForwardDiff is listed in [deps] but never loaded by the package — src/ references it only in comments, and the generic kernels dispatch on Union{Real, Complex} (KLUGenericTypes) with no ForwardDiff code. It is used only by the test suite, where it was already correctly declared via [extras]/[targets] (it appeared in both [deps] and [extras], the telltale of a leftover). The ForwardDiff = "1" compat entry stays valid for the test target.

Why this matters

The phantom strong dep pulls ForwardDiff → DiffRules → LogExpFunctions/SpecialFunctions — 10 packages — into the runtime dependency graph of every downstream user (notably LinearSolve, where PureKLU is a strong dep).

It also broke LinearSolve's Downgrade CI (failing on main since 2026-06-07): ForwardDiff 1.4.0 is the first version allowing LogExpFunctions 1.x, so the downgrade resolver (minimal direct deps, maximized indirect deps) pins LogExpFunctions 1.0.1 into the downgraded manifest, and the test sandbox then cannot add the Zygote 0.7 test dep (requires LogExpFunctions 0.3.x) with allow_reresolve = false.

Verification (run locally)

  • Pkg.test() on this branch: "Testing PureKLU tests passed" (the test suite exercises ForwardDiff duals via the test target, unaffected).
  • Downgrade-CI simulation on Julia 1.10.11: LinearSolve main, downgraded with the same julia-downgrade-compat procedure CI uses, with this PureKLU in place of 1.0.0 — the entire ForwardDiff chain (CommonSubexpressions, DiffResults, DiffRules, ForwardDiff, IrrationalConstants, LogExpFunctions, NaNMath, OpenLibm_jll, OpenSpecFun_jll, SpecialFunctions) drops out of the manifest and the previously-failing test-sandbox resolution succeeds (Testing Running tests...).

Version bumped to 1.0.1. Follow-up after registration: bump PureKLU = "1.0.1" lower bound in LinearSolve so its Downgrade job resolves the fixed version (downgrade pins PureKLU to the compat lower bound, so "1" would keep selecting 1.0.0).

🤖 Generated with Claude Code

ForwardDiff was listed in [deps] but is never loaded by the package
(src/ references it only in comments; the generic kernels dispatch on
Union{Real, Complex} and need no ForwardDiff code). It is only used by
the test suite, where it was already correctly declared via
[extras]/[targets], and the compat entry remains valid for that.

The phantom strong dependency pulled ForwardDiff -> DiffRules ->
LogExpFunctions/SpecialFunctions (10 packages) into the runtime
dependency graph of every downstream user, and broke LinearSolve's
Downgrade CI once ForwardDiff 1.4.0 allowed LogExpFunctions 1.x (the
downgrade resolver then pins LogExpFunctions 1.0.1 against the Zygote
0.7 test dep, which requires 0.3.x).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Collaborator Author

Downstream follow-up: SciML/LinearSolve.jl#1028 bumps the PureKLU lower bound to 1.0.1 once this is registered.

@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 10, 2026 03:41
@ChrisRackauckas ChrisRackauckas merged commit d1fef33 into main Jun 10, 2026
11 of 12 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.

2 participants