Skip to content

v7: drop dead has_destats re-export; revert Hard DAE assertion#3479

Merged
ChrisRackauckas merged 1 commit intoSciML:v7from
ChrisRackauckas-Claude:fix-v7-has-destats-and-hard-dae
Apr 20, 2026
Merged

v7: drop dead has_destats re-export; revert Hard DAE assertion#3479
ChrisRackauckas merged 1 commit intoSciML:v7from
ChrisRackauckas-Claude:fix-v7-has-destats-and-hard-dae

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Summary

Two targeted fixes for remaining non-lts real failures on v7 CI.

  • lib/DiffEqBase/src/DiffEqBase.jl: remove has_destats from the SciMLBase import list. It was dropped from SciMLBase v3, is unused anywhere else in the repo, and currently emits WARNING: Imported binding SciMLBase.has_destats was undeclared at import time on 1.12 / UndefVarError: has_destats not defined on 1.10 (where [sources] is ignored).
  • test/regression/hard_dae.jl: revert line 305 to @test abs(sol(2 - 2^-10, idxs = 1)) <= 1e-4. The assertion added in Fix FunctionMap DiscreteProblem import; correct Hard DAE test assertion #3469 (≈ 5.0) was incorrect. The hardstop! DAE has mass matrix Diagonal([1,0,1]) so only u[2] is algebraic; gravity (du[3] = pg for t<2) drives u[1] down from 5, and once y ≤ 0 the algebraic branch pins y ≈ 0 well before the callback at t=2. CI (Regression_I 1.11 and Regression_I pre) showed sol(2-2^-10, idxs=1) evaluating to 0.0 / 0.275…, not 5.0 — the original assertion was correct.

Test plan

  • CI Regression_I on 1 / 1.11 / pre passes
  • No new precompile warnings/errors from DiffEqBase

🤖 Generated with Claude Code

- `has_destats` was removed from SciMLBase v3 but DiffEqBase still
  re-exported it, producing `UndefVarError: has_destats` at precompile
  on the registered DiffEqBase used by Julia 1.10 (which ignores
  [sources]). The symbol is unused in this repo — drop it from the
  import list.

- `test/regression/hard_dae.jl:305`: revert the assertion to
  `abs(sol(2-2^-10, idxs=1)) <= 1e-4`. The `hardstop!` DAE with
  mass matrix `Diagonal([1,0,1])` only makes `u[2]` algebraic;
  gravity (`du[3] = pg` for `t<2`) drives `u[1]` from 5 down, and
  the `y<=0` branch of the algebraic law pins `y≈0` well before
  `t=2`. The earlier `≈ 5.0` assertion was wrong.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas merged commit 9421cb3 into SciML:v7 Apr 20, 2026
126 of 239 checks passed
ChrisRackauckas added a commit that referenced this pull request Apr 20, 2026
- `has_destats` was removed from SciMLBase v3 but DiffEqBase still
  re-exported it, producing `UndefVarError: has_destats` at precompile
  on the registered DiffEqBase used by Julia 1.10 (which ignores
  [sources]). The symbol is unused in this repo — drop it from the
  import list.

- `test/regression/hard_dae.jl:305`: revert the assertion to
  `abs(sol(2-2^-10, idxs=1)) <= 1e-4`. The `hardstop!` DAE with
  mass matrix `Diagonal([1,0,1])` only makes `u[2]` algebraic;
  gravity (`du[3] = pg` for `t<2`) drives `u[1]` from 5 down, and
  the `y<=0` branch of the algebraic law pins `y≈0` well before
  `t=2`. The earlier `≈ 5.0` assertion was wrong.

Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
ChrisRackauckas added a commit that referenced this pull request Apr 21, 2026
- `has_destats` was removed from SciMLBase v3 but DiffEqBase still
  re-exported it, producing `UndefVarError: has_destats` at precompile
  on the registered DiffEqBase used by Julia 1.10 (which ignores
  [sources]). The symbol is unused in this repo — drop it from the
  import list.

- `test/regression/hard_dae.jl:305`: revert the assertion to
  `abs(sol(2-2^-10, idxs=1)) <= 1e-4`. The `hardstop!` DAE with
  mass matrix `Diagonal([1,0,1])` only makes `u[2]` algebraic;
  gravity (`du[3] = pg` for `t<2`) drives `u[1]` from 5 down, and
  the `y<=0` branch of the algebraic law pins `y≈0` well before
  `t=2`. The earlier `≈ 5.0` assertion was wrong.

Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Claude Opus 4 (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.

2 participants