Remove unused ForwardDiff dependency (v1.0.1)#63
Merged
Conversation
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>
Collaborator
Author
|
Downstream follow-up: SciML/LinearSolve.jl#1028 bumps the PureKLU lower bound to 1.0.1 once this is registered. |
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.
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 onUnion{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). TheForwardDiff = "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
mainsince 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) withallow_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).main, downgraded with the samejulia-downgrade-compatprocedure 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