Skip to content

v7: Strip top-level OrdinaryDiffEq to minimal re-export shell#3249

Merged
ChrisRackauckas merged 2 commits intoSciML:v7from
ChrisRackauckas-Claude:v7-reduce-dependencies
Mar 27, 2026
Merged

v7: Strip top-level OrdinaryDiffEq to minimal re-export shell#3249
ChrisRackauckas merged 2 commits intoSciML:v7from
ChrisRackauckas-Claude:v7-reduce-dependencies

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Summary

  • BREAKING: Strip OrdinaryDiffEq.jl down from 28+ solver subpackage dependencies to only 6 direct deps (OrdinaryDiffEqDefault, OrdinaryDiffEqCore, OrdinaryDiffEqTsit5, OrdinaryDiffEqVerner, OrdinaryDiffEqRosenbrock, OrdinaryDiffEqBDF + Reexport, CommonSolve, SciMLBase, DocStringExtensions)
  • using OrdinaryDiffEq now provides only the commonly used algorithms: Tsit5, Vern6-9, Rosenbrock23/Rodas5P and family, FBDF/QNDF and family, and the DefaultODEAlgorithm auto-selector
  • Users needing other solvers (SDIRK, FIRK, Extrapolation, LowStorageRK, SSPRK, Symplectic, etc.) must explicitly using OrdinaryDiffEqSDIRK or the relevant sublibrary
  • Version bumped to 7.0.0-DEV

This 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 OrdinaryDiffEq

  • solve(prob) (default algorithm selection)
  • solve(prob, Tsit5())
  • solve(prob, Vern7()), Vern6(), Vern8(), Vern9()
  • solve(prob, Rosenbrock23()), Rodas5P(), and all Rosenbrock methods
  • solve(prob, FBDF()), QNDF(), and all BDF methods
  • AutoTsit5, AutoVern7, etc.
  • All core utilities (controllers, composite algorithms, etc.)

What requires explicit sublibrary import in v7

  • using OrdinaryDiffEqSDIRK for ImplicitEuler, KenCarp4, TRBDF2, etc.
  • using OrdinaryDiffEqLowOrderRK for Euler, DP5, BS3, RK4, etc.
  • using OrdinaryDiffEqFIRK for RadauIIA5, etc.
  • using OrdinaryDiffEqExponentialRK for exponential integrators
  • And ~20 other solver subpackages

Test plan

  • Package loads successfully with using OrdinaryDiffEq
  • All default algorithms (Tsit5, Vern7, Rosenbrock23, Rodas5P, FBDF) are accessible
  • DefaultODEAlgorithm works (auto-selection)
  • ODE solving works end-to-end
  • CI tests for sublibrary-specific tests may need updating to add explicit imports

🤖 Generated with Claude Code

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>
@oscardssmith
Copy link
Copy Markdown
Member

can we also get rid of the @reexport use and figure out specifically which exports we want?

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>
@ChrisRackauckas ChrisRackauckas merged commit 6fb78a5 into SciML:v7 Mar 27, 2026
4 of 16 checks passed
@@ -13,12 +13,14 @@
# selection logic. It transitively depends on Tsit5, Verner, Rosenbrock, and BDF.
@reexport using OrdinaryDiffEqDefault
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the user rarely changes the default method.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this?

using Reexport

# OrdinaryDiffEqCore provides core utilities and re-exports SciMLBase.
@reexport using OrdinaryDiffEqCore
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also change OrdinaryDiffEQCore to not reexport all of SciMLBase. E.G. We don't need BVProblem

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.

3 participants