Skip to content

Remove unused DifferentiationInterface dependency#24

Merged
andrewning merged 2 commits intobyuflowlab:mainfrom
mx-p9a:di-deps
Feb 13, 2026
Merged

Remove unused DifferentiationInterface dependency#24
andrewning merged 2 commits intobyuflowlab:mainfrom
mx-p9a:di-deps

Conversation

@mx-p9a
Copy link
Copy Markdown
Contributor

@mx-p9a mx-p9a commented Feb 11, 2026

Remove unused DifferentiationInterface dependency

Summary

Removes DifferentiationInterface from both [deps] and [compat] in Project.toml. This package is listed as a dependency but is never imported or used in any source file.
This was preventing updating GXBeam.jl

Motivation

DifferentiationInterface was added as a dependency in v1.0.0 but no code in ImplicitAD actually uses it -- all AD is done directly through ForwardDiff, ReverseDiff, and ChainRulesCore. Having it as a dependency unnecessarily constrains downstream packages (e.g., pinning them to DI 0.6) and increases install/precompile times.

This was discovered while upgrading GXBeam.jl from the deprecated SparseDiffTools.jl to DifferentiationInterface.jl (see GXBeam.jl#136). The DI = "0.6" compat bound in ImplicitAD prevented GXBeam from using DI 0.7, which is needed for compatibility with the latest SciML ecosystem.

Changes

  • Project.toml: Removed DifferentiationInterface from [deps] and [compat]

No source code changes -- the package was never used.

NLsolve with autodiff=:forward now uses DifferentiationInterface
internally, which has strict type checks in v0.7. When yprev is a
SubArray (column view from odesolve), DI's preparation fails with a
PreparationMismatchError. Convert to Vector before passing to nlsolve.
@andrewning
Copy link
Copy Markdown
Member

It is actually used. Not directly, but ForwardDiff, etc. use DifferentiationInterface, and ImplicitAD was not fully working with the latest version of DifferentiationInterface so we had to pin the version of DI. There were a lot of changes happening with DI at the time, but looks like unit tests are passing now without the pin so I'll pull this.

@andrewning andrewning merged commit 31c5825 into byuflowlab:main Feb 13, 2026
3 checks passed
@mx-p9a
Copy link
Copy Markdown
Contributor Author

mx-p9a commented Feb 13, 2026

Makes sense, thanks!

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