Raise ModelingToolkitBase DiffEqBase 7.x floor to 7.4.2 (fix downgrade VectorContinuousCallback crash)#4709
Merged
ChrisRackauckas merged 2 commits intoJul 5, 2026
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, ...)readscallback.affect_neg!, but SciMLBase removed theaffect_neg!field fromVectorContinuousCallback(it had been an unreachable no-op shim aliased toaffect!—apply_callback!only ever callsaffect!for a VCC). SciMLBase3.18.0 (and current master) has no such field, so any
VectorContinuousCallbackevent 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!onVectorContinuousCallback; 7.4.2+ do not. Raise the 7.x compat floor from7.2to7.4.2inlib/ModelingToolkitBase/Project.tomlso the downgraderesolver can no longer pick a DiffEqBase that reads the removed field.
Validation (local)
hasfield(VectorContinuousCallback, :affect_neg!) == falseon SciMLBase 3.18.0 (the root cause), and that the installed DiffEqBase 7.4.2VectorContinuousCallbackevent path contains nocallback.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_allinlib/ModelingToolkitBase/test/qa/aqua.jland the roottest/qa/qa.jl) is not addressed here: making it green requires eitherupstream 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