Skip to content

Raise ModelingToolkitBase DiffEqBase 7.x floor to 7.4.2 (fix downgrade VectorContinuousCallback crash)#4709

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-red-lane
Jul 5, 2026
Merged

Raise ModelingToolkitBase DiffEqBase 7.x floor to 7.4.2 (fix downgrade VectorContinuousCallback crash)#4709
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-red-lane

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Summary

Fixes the ModelingToolkitBase downgrade CI lane. The sublibrary downgrade
force-min-resolves DiffEqBase 7.2.0 together with SciMLBase 3.18.0.

DiffEqBase's check_event_occurrence_upto(::VectorContinuousCallback, ...) reads
callback.affect_neg!, but SciMLBase removed the affect_neg! field from
VectorContinuousCallback (it had been an unreachable no-op shim aliased to
affect!apply_callback! only ever calls affect! for a VCC). SciMLBase
3.18.0 (and current master) has no such field, so any VectorContinuousCallback
event firing crashes at runtime — surfaced in lib/ModelingToolkitBase/test/symbolic_events.jl.

Fix

Bisected the DiffEqBase 7.x line: 7.2.0 – 7.4.1 read callback.affect_neg! on
VectorContinuousCallback; 7.4.2+ do not
. Raise the 7.x compat floor from
7.2 to 7.4.2 in lib/ModelingToolkitBase/Project.toml so the downgrade
resolver can no longer pick a DiffEqBase that reads the removed field.

-DiffEqBase = "6.210.0, 7.2"
+DiffEqBase = "6.210.0, 7.4.2"

Validation (local)

  • Original floor: downgrade harness resolves DiffEqBase 7.2.0 + SciMLBase 3.18.0 (the broken combo).
  • With bumped floor: downgrade harness resolves DiffEqBase 7.4.2 + SciMLBase 3.18.0; resolves and instantiates clean on Julia 1.10 (lts).
  • Verified hasfield(VectorContinuousCallback, :affect_neg!) == false on SciMLBase 3.18.0 (the root cause), and that the installed DiffEqBase 7.4.2 VectorContinuousCallback event path contains no callback.affect_neg! read (whereas 7.2.0 does).

Note

Please ignore until reviewed by @ChrisRackauckas.

This PR is scoped to the downgrade lane only. The separate QA lane (bare
Aqua.test_all in lib/ModelingToolkitBase/test/qa/aqua.jl and the root
test/qa/qa.jl) is not addressed here: making it green requires either
upstream SciMLBase fixes (the ~45 flagged ambiguities are SciMLBase-constructor
ambiguities) or silencing the Aqua ambiguity / JET checks, which is out of scope
for this focused fix.

🤖 Generated with Claude Code

…uousCallback affect_neg! removal)

The downgrade CI for the ModelingToolkitBase sublibrary force-min-resolves
DiffEqBase 7.2.0 together with SciMLBase 3.18.0. DiffEqBase's
`check_event_occurrence_upto(::VectorContinuousCallback, ...)` reads
`callback.affect_neg!`, but SciMLBase removed the `affect_neg!` field from
`VectorContinuousCallback` (it was an unreachable no-op shim; `apply_callback!`
only ever calls `affect!` for a VCC). SciMLBase 3.18.0 has no such field, so any
`VectorContinuousCallback` event firing crashes at runtime (surfaced in
symbolic_events.jl).

DiffEqBase 7.4.2 is the first 7.x release that stopped reading
`callback.affect_neg!` on `VectorContinuousCallback` (bisected: 7.2.0-7.4.1 read
it, 7.4.2+ do not). Raise the 7.x compat floor from 7.2 to 7.4.2 so the
downgrade resolver can no longer select a DiffEqBase that reads the removed
field. Verified: with the bumped floor the downgrade harness resolves DiffEqBase
7.4.2 (co-resolved SciMLBase 3.18.0), and the 7.4.2 VCC event path no longer
touches affect_neg!.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
DiffEqBase 6.x requires SciMLBase 2.x, while DiffEqBase 7.x requires
SciMLBase 3.x. Both the root package (SciMLBase = "3") and
ModelingToolkitBase (SciMLBase = "3.18") pin the SciMLBase 3.x major,
so DiffEqBase 6.x can never coexist with them -- the 6.x floors
(6.213.0 / 6.210.0) were dead entries the downgrade resolver could
never actually pick (it force-min-resolved DiffEqBase 7.x regardless).

Drop the old 6.x major so the compat honestly reflects the supported
range: current major only, floored at 7.4.2 (the first 7.x that no
longer reads the removed VectorContinuousCallback.affect_neg! field).

Downgrade harness now min-resolves DiffEqBase 7.4.2 + SciMLBase 3.18.0
for both lib/ModelingToolkitBase and the root (InterfaceI) on lts.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review July 5, 2026 07:02
@ChrisRackauckas ChrisRackauckas merged commit fb71603 into SciML:master Jul 5, 2026
68 of 89 checks passed
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