Fix deprecation and method redefinition warnings in CI tests#1264
Merged
ChrisRackauckas merged 1 commit intoSciML:masterfrom Feb 9, 2026
Merged
Conversation
- Rename overwritten function definitions to unique names in test files to eliminate "WARNING: Method definition overwritten" messages - Add `local` keyword to disambiguate soft scope assignments in test loops and @test_broken blocks - Replace deprecated ModelingToolkit APIs: ODESystem -> System, NonlinearSystem -> System, structural_simplify -> mtkcompile - Replace deprecated sol[end] indexing with sol.u[end] for RecursiveArrayTools compatibility - Fix function signatures (add missing `p` parameter) that were previously hidden by method accumulation on shared `f` generic Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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
WARNING: Method definition overwrittenmessages (7 files)localkeyword to disambiguate soft scope assignments in test loops and@test_brokenblocks (4 files)ODESystem→System,NonlinearSystem→System,structural_simplify→mtkcompilesol[end]indexing withsol.u[end]for RecursiveArrayTools compatibilitypparameter) that were previously hidden by method accumulation on sharedfgenericDetails
Method redefinition warnings fixed
These test files defined multiple functions named
fwith different signatures, causingWARNING: Method definition f(...) overwrittenmessages in CI:test/problem_creation_tests.jl— renamed tof_ode,f_2ndorder,f_sde,g_sde,f_dae,f_rode,f_discrete,f_steadytest/forwarddiff_dual_detection.jl— renamed tof_nlsolve,f_1021test/downstream/solve_error_handling.jl— renamed tof_oop,f_iip,f_sdetest/downstream/community_callback_tests.jl— renamed tocollision_affect!,terminate_affect!test/downstream/distributed_ensemble.jl— renamed tosimple_prob_func,lorenz_prob_funcSoft scope warnings fixed
test/downstream/kwarg_warn.jl— removed unnecessarysol =assignment in@test_throwstest/downstream/solve_error_handling.jl— addedlocalinforloop, removed unnecessary assignmenttest/downstream/null_de.jl— addedlocalinforlooptest/downstream/default_linsolve_structure.jl— addedlocalin@test_brokenblocksDeprecated API replacements
test/downstream/null_de.jl—ODESystem→System,NonlinearSystem→System,structural_simplify→mtkcompiletest/downstream/subarray_support.jl—sol[end]→sol.u[end]Test plan
--depwarn=yes🤖 Generated with Claude Code