Skip to content

import ODESolution from SciMLBase instead of OrdinaryDiffEqCore - #219

Open
ChrisRackauckas-Claude wants to merge 1 commit into
NumericalMathematics:mainfrom
ChrisRackauckas-Claude:import-odesolution-from-scimlbase
Open

import ODESolution from SciMLBase instead of OrdinaryDiffEqCore#219
ChrisRackauckas-Claude wants to merge 1 commit into
NumericalMathematics:mainfrom
ChrisRackauckas-Claude:import-odesolution-from-scimlbase

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown

Heads-up about an upstream change plus a fix — no action needed on your released version.

What will break

OrdinaryDiffEqCore on SciML master (v4.14.0, not yet registered) removed its blanket @reexport using SciMLBase in SciML/OrdinaryDiffEq.jl#4119. That dropped 152 names from OrdinaryDiffEqCore's namespace without a major version bump, and ODESolution is one of them.

PositiveIntegrators reaches ODESolution through OrdinaryDiffEqCore, and the compat entry OrdinaryDiffEqCore = "4.2" admits 4.14.0, so using PositiveIntegrators fails once that version is registered:

WARNING: Imported binding OrdinaryDiffEqCore.ODESolution was undeclared at import time during import to PositiveIntegrators.
ERROR: LoadError: UndefVarError: `ODESolution` not defined in `PositiveIntegrators`
Suggestion: this global was defined as `OrdinaryDiffEqCore.ODESolution` but not assigned a value.
Hint: a global variable of this name also exists in SciMLBase.
Stacktrace:
  [1] top-level scope
    @ ~/PositiveIntegrators.jl/src/utilities.jl:30

The released v0.2.18 is covered separately by a retroactive registry cap (JuliaRegistries/General#163935), so existing users are protected either way and there is no time pressure here. This PR is just so a future release keeps working.

What this changes

ODESolution is owned and exported by SciMLBase, which is already a direct dependency. The import moves there; nothing else changes.

 using SciMLBase: AbstractODEFunction, NullParameters, FullSpecialize,
-                 isinplace
+                 isinplace, ODESolution

 # TODO: Check imports and using statements below, reduce if possible
-using OrdinaryDiffEqCore: OrdinaryDiffEqCore, OrdinaryDiffEqAlgorithm, ODESolution
+using OrdinaryDiffEqCore: OrdinaryDiffEqCore, OrdinaryDiffEqAlgorithm

No Project.toml change is needed: SciMLBase is already in [deps], and the existing floor is enough — on SciMLBase v3.7.0, Base.ispublic(SciMLBase, :ODESolution) is true.

ODESolution is the only affected name. I checked every name the package pulls from OrdinaryDiffEqCore against v4.14.0; all the others (OrdinaryDiffEqAlgorithm, OrdinaryDiffEqAdaptiveAlgorithm, OrdinaryDiffEqConstantCache, OrdinaryDiffEqMutableCache, _vec, alg_order, isfsal, calculate_residuals, calculate_residuals!, alg_cache, get_tmp_cache, initialize!, perform_step!, _ode_interpolant, _ode_interpolant!, get_fsalfirstlast, set_EEst!, and step! used in the tests) are still defined there.

Verification

Julia 1.12.6, this branch.

1. Current registered OrdinaryDiffEqCore v4.13.0 — full test suite passes

Test Summary:                |   Pass   Total       Time
PositiveIntegrators.jl tests | 125374  125374  106m00.1s
     Testing PositiveIntegrators tests passed

2. OrdinaryDiffEqCore v4.14.0 (SciML master) — loads, and full test suite passes

Test Summary:                |   Pass   Total       Time
PositiveIntegrators.jl tests | 125374  125374  107m27.5s
     Testing PositiveIntegrators tests passed

3. Without this change, against v4.14.0 — the load error quoted above.

What I did not verify

For run (2) I had to dev the master versions of OrdinaryDiffEqLowOrderRK, OrdinaryDiffEqTsit5 and OrdinaryDiffEqVerner alongside OrdinaryDiffEqCore. That is not about this package: the registered OrdinaryDiffEqLowOrderRK v2.2.2 is itself broken against OrdinaryDiffEqCore v4.14.0 (invalid method definition in OrdinaryDiffEqLowOrderRK: exported function OrdinaryDiffEqCore.u_cache does not exist), so the test environment could not even precompile. That is SciML/OrdinaryDiffEq.jl#4175 and is being fixed on the SciML side. OrdinaryDiffEqRosenbrock and OrdinaryDiffEqSDIRK at their registered versions were fine against 4.14.0.

I could not test against a fully released ecosystem at OrdinaryDiffEqCore 4.14.0 because that version is not registered yet. I also did not build the docs.

JuliaFormatter v1.0.60 with your .JuliaFormatter.toml reports no changes.

Links

OrdinaryDiffEqCore v4.14.0 drops `@reexport using SciMLBase`, so
`ODESolution` is no longer reachable through OrdinaryDiffEqCore. It is
owned and exported by SciMLBase, which is already a direct dependency.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@JoshuaLampert JoshuaLampert left a comment

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.

Thanks! Generally, this LGTM, but there is an error in the docs that looks unrelated to this PR , but you probably know best, where this comes from, @ChrisRackauckas. Could you take a look, please?

@ChrisRackauckas

Copy link
Copy Markdown
Contributor

Oh that's a known regression in the error printing, we're getting to that very soon CC @Shreyas-Ekanathan

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