v7: Strip top-level OrdinaryDiffEq to minimal re-export shell#3249
Merged
ChrisRackauckas merged 2 commits intoSciML:v7from Mar 27, 2026
Merged
Conversation
BREAKING: OrdinaryDiffEq.jl now only depends on OrdinaryDiffEqDefault and its transitive dependencies (Core, Tsit5, Verner, Rosenbrock, BDF). Users needing other solvers must explicitly import the specific sublibrary (e.g., `using OrdinaryDiffEqSDIRK` for ImplicitEuler, KenCarp4, etc.). The available algorithms from `using OrdinaryDiffEq` are now: - DefaultODEAlgorithm (auto-selection) - Tsit5, AutoTsit5 - Vern6, Vern7, Vern8, Vern9, AutoVern6/7/8/9 - Rosenbrock23, Rosenbrock32, Rodas3/4/5/5P/5Pe/5Pr, and other Rosenbrock methods - FBDF, QNDF, ABDF2, and other BDF methods - Core utilities (CompositeAlgorithm, AutoSwitch, controllers, etc.) This reduces the dependency count from 28+ solver subpackages + many external deps to just 6 direct deps (+ their transitive deps), greatly improving install time and load time for users who only need common solvers. Refs SciML#2310 Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
|
can we also get rid of the I also think we don't want to support all the Rosenbrocks as exported by default. If we ever made a separate package for Rosenbrock23 and Rodas5P (for example) we don't necessarily want to have to keep importing all of the other rosenbrocks. |
…k, BDF Instead of blanket @reexport of entire sub-packages, explicitly import and export only the widely-used algorithms: Tsit5, AutoTsit5, Vern6-9, AutoVern6-9, Rosenbrock23, Rodas5P, and FBDF. This allows future separation of less common algorithms into opt-in packages without breaking the default export surface. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| @@ -13,12 +13,14 @@ | |||
| # selection logic. It transitively depends on Tsit5, Verner, Rosenbrock, and BDF. | |||
| @reexport using OrdinaryDiffEqDefault | |||
Member
There was a problem hiding this comment.
I guess the user rarely changes the default method.
Member
There was a problem hiding this comment.
like we could (and IMO it would be reasonable) to export DefaultSolver (e.g. to turn on autodiff). I just really dislike blanket reexports.
| export FBDF | ||
|
|
||
| # Re-export Reexport for downstream compatibility | ||
| export Reexport, @reexport |
| using Reexport | ||
|
|
||
| # OrdinaryDiffEqCore provides core utilities and re-exports SciMLBase. | ||
| @reexport using OrdinaryDiffEqCore |
Member
There was a problem hiding this comment.
This should also change OrdinaryDiffEQCore to not reexport all of SciMLBase. E.G. We don't need BVProblem
3 tasks
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
OrdinaryDiffEq.jldown from 28+ solver subpackage dependencies to only 6 direct deps (OrdinaryDiffEqDefault, OrdinaryDiffEqCore, OrdinaryDiffEqTsit5, OrdinaryDiffEqVerner, OrdinaryDiffEqRosenbrock, OrdinaryDiffEqBDF + Reexport, CommonSolve, SciMLBase, DocStringExtensions)using OrdinaryDiffEqnow provides only the commonly used algorithms: Tsit5, Vern6-9, Rosenbrock23/Rodas5P and family, FBDF/QNDF and family, and the DefaultODEAlgorithm auto-selectorusing OrdinaryDiffEqSDIRKor the relevant sublibraryThis addresses the v7 goal from #2310 of making the top-level package lightweight while keeping the most commonly needed algorithms accessible by default.
What still works with just
using OrdinaryDiffEqsolve(prob)(default algorithm selection)solve(prob, Tsit5())solve(prob, Vern7()),Vern6(),Vern8(),Vern9()solve(prob, Rosenbrock23()),Rodas5P(), and all Rosenbrock methodssolve(prob, FBDF()),QNDF(), and all BDF methodsAutoTsit5,AutoVern7, etc.What requires explicit sublibrary import in v7
using OrdinaryDiffEqSDIRKfor ImplicitEuler, KenCarp4, TRBDF2, etc.using OrdinaryDiffEqLowOrderRKfor Euler, DP5, BS3, RK4, etc.using OrdinaryDiffEqFIRKfor RadauIIA5, etc.using OrdinaryDiffEqExponentialRKfor exponential integratorsTest plan
using OrdinaryDiffEq🤖 Generated with Claude Code