refactor: update to new SciMLBase remake API hooks with context structs#4496
Merged
Conversation
3 tasks
SciMLBase v3.1.0 (commit 09770ffa, 2026-04-10, "refactor: pass context struct to late_binding_update_u0_p") added a trailing `ctx::LateBindingUpdateU0PContext` argument (with default) that the v3 public path now forwards as an 8th positional. MTK's 7-arg overload no longer dispatches; SciMLBase's 8-arg no-op fallback wins, so `newp.initials` was never updated and `initialize_dae!` then re-solved `u` against the stale `Initial` values. This surfaced as four failing assertions in the OrdinaryDiffEq.jl `reinit! updates initial parameters` testset (lib/OrdinaryDiffEqNonlinearSolve/test/modelingtoolkit/dae_initialize_integration.jl:98-101). Wraps the original body in a small `_late_binding_update_u0_p_impl` helper and dispatches via `@static if isdefined(SciMLBase, :LateBindingUpdateU0PContext)` so the patch keeps working on the SciMLBase v2 line that the package's `[compat]` still supports (`SciMLBase = "2.149.0, 3"`). On v3.1.0+ the 8-arg method matches; on v2 the 7-arg method is defined as before. Verified locally: with this patch and SciMLBase v3.6.0 resolved, the OrdinaryDiffEq `reinit! updates initial parameters` testset goes from 4 fail / 4 pass to 8 / 8 pass. Fixes #4473. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
f2e8ba6 to
8910d01
Compare
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.
Supersedes #4474