Skip to content

CompatHelper: bump compat for DiffEqBase to 7, (keep existing compat)#407

Closed
github-actions[bot] wants to merge 1 commit into
mainfrom
compathelper/new_version/2026-04-22-02-54-10-268-01825267716
Closed

CompatHelper: bump compat for DiffEqBase to 7, (keep existing compat)#407
github-actions[bot] wants to merge 1 commit into
mainfrom
compathelper/new_version/2026-04-22-02-54-10-268-01825267716

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

This pull request changes the compat entry for the DiffEqBase package from 6.194 to 6.194, 7.
This keeps the compat entries for earlier versions.

Note: I have not tested your package with this new compat entry.
It is your responsibility to make sure that your package tests pass before you merge this pull request.

@nathanaelbosch nathanaelbosch force-pushed the compathelper/new_version/2026-04-22-02-54-10-268-01825267716 branch from b8ed447 to 8608a7d Compare April 22, 2026 02:54
@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.70%. Comparing base (d58e2f5) to head (8608a7d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #407   +/-   ##
=======================================
  Coverage   91.70%   91.70%           
=======================================
  Files          44       44           
  Lines        2207     2207           
=======================================
  Hits         2024     2024           
  Misses        183      183           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

nathanaelbosch added a commit that referenced this pull request May 13, 2026
…king changes (#410)

* Handle OrdinaryDiffEq v7 / DiffEqBase v7 / OrdinaryDiffEqCore v4 breaking changes

Bump compats to the new major versions (matching CompatHelper PRs #407, #408, #409)
and gate the OrdinaryDiffEqCore internals we extend so the package continues to build
against both OrdinaryDiffEqCore v3 and v4.

v4 removed a handful of internal hooks that ProbNumDiffEq relied on:

- `OrdinaryDiffEqCore._default_dae_init!(integrator, prob, x, alg)` was deleted
  along with the per-solver DAE-init dispatch; initialization now routes through
  `_initialize_dae!(integrator, prob, alg::DefaultInit, x)` and the default
  algorithm switched from `BrownFullBasicInit` to `CheckInit`. Restore the prior
  behaviour for `AbstractEK` by overriding `_initialize_dae!` for our integrator
  type on v4.
- `OrdinaryDiffEqCore.isstandard` / `ispredictive` traits were removed; PI control
  is now the default via `default_controller`, so the trait overrides are only
  needed on v3.
- `integrator.EEst` was removed from the `ODEIntegrator` struct and replaced with
  `OrdinaryDiffEqCore.get_EEst` / `set_EEst!` accessors backed by
  `integrator.controller_cache`. Wrap both call sites in `perform_step!` with
  helpers that pick the right API per version.
- `OrdinaryDiffEqCore._process_AD_choice` is gone on v4 (the `chunk_size` /
  `diff_type` / `standardtag` solver kwargs were removed in favour of
  `AutoForwardDiff(chunksize=…)` / `AutoFiniteDiff(fdtype=…)`). Fall back to an
  inlined equivalent so `EK1` / `DiagonalEK1` keep accepting the legacy kwargs
  on both versions.

See the OrdinaryDiffEq v7 NEWS.md for the full list of breaking changes.

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

* JuliaFormatter

* Fix v4/v7 stack CI failures: scope reduction, RAT v4, Bool autodiff, DiffEqDevTools v4

Four distinct failures surfaced once CI started resolving the v4/v7 stack
(which became possible after the gating deps registered in General).

1. UndefVarError: RadauIIA5. OrdinaryDiffEq v7's package scope reduction
   means `using OrdinaryDiffEq` no longer re-exports the full solver suite.
   Add `using OrdinaryDiffEqFIRK: RadauIIA5` in test/stiff_problem.jl and
   test/mass_matrix.jl, plus the dep UUID in test/Project.toml.

2. length(sol) returned the wrong value at test/solution.jl:29,96.
   RecursiveArrayTools v4 changed length(sol) from "number of timesteps"
   to prod(size(sol)) since AbstractVectorOfArray now subtypes AbstractArray.
   Switch to length(sol.u) per the v7 NEWS migration.

3. MethodError: prepare_ADType(::Bool, ...) when EK1 or DiagonalEK1 was
   constructed with the legacy autodiff=true or autodiff=false kwarg.
   The v4 fallback for _process_AD_choice in src/algorithms.jl only handled
   AutoForwardDiff and AutoFiniteDiff; the v3 OrdinaryDiffEqCore version
   it replaced also converted Bool to an ADType. Mirror that conversion so
   the Bool no longer propagates as the AD type parameter on the algorithm.

4. ArgumentError: Passing a Bool for verbose, raised by DiffEqDevTools v3's
   WorkPrecisionSet on test/diffeqdevtools.jl:79. DiffEqDevTools v4 removed
   the offending kwarg. Widen Project.toml compat to "2.46, 3, 4" so the
   resolver picks v4 on the v4/v7 stack.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Switch default DAE init to CheckInit; drop verbose=false from broken WP test

Two changes:

1. src/algorithms.jl: replace the AbstractEK DAE-init override with one that
   routes through CheckInit on both stacks. Matches the OrdinaryDiffEq v7 /
   DifferentialEquations v8 default (errors on inconsistent ICs instead of
   silently correcting them). Users who want the old auto-fix behavior must
   now pass initializealg=BrownFullBasicInit() explicitly. On v4 the per-alg
   hook is gone and CheckInit is already the default, so the override is only
   needed on v3. Verified locally against test/mass_matrix.jl on the v4/v7
   stack: both UniformScaling and Robertson mass-matrix tests pass with
   consistent ICs.

2. test/diffeqdevtools.jl: drop verbose=false from the two WorkPrecisionSet
   calls in the "is broken" testset. DiffEqDevTools v3 forwards verbose as a
   Bool which OrdinaryDiffEq v7 rejects (DEVerbosity / SciMLLogging required).
   DiffEqDevTools v4 removed the kwarg, but v4.0.0 is yanked in General, so
   we drop the kwarg test-side. On v3/v6 this only removes a deprecation
   warning the test was already eating.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Address code review feedback: fix AutoFiniteDiff regression, trim comments

Two functional changes in src/algorithms.jl:

- Drop the stray em-dash from the `_process_AD_choice` overview comment to
  comply with the project's no-em-dashes style.

- Guard the `AutoFiniteDiff` branch of the v4 `_process_AD_choice` fallback
  to only rebuild the ADType when the user passed a non-default legacy
  `diff_type` kwarg. The previous version unconditionally rebuilt with
  `fdtype=diff_type`, which silently dropped a user's pre-configured
  `AutoFiniteDiff(fdtype=Val(:central))` (or similar) when they didn't also
  set the legacy `diff_type`. Mirrors v3's behavior.

Comment trim across src/algorithms.jl and src/alg_utils.jl: the
`_alg_autodiff` block, the `_process_AD_choice` overview, the Bool-branch
inline comment, and the DAE-init block are all condensed without losing
the migration rationale. Saves ~10 lines in the compat-shim region.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Nathanael Bosch <nathanael.bosch@epfl.ch>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant