Skip to content

Comments

Fix deprecation warnings#439

Merged
ChrisRackauckas merged 1 commit intoSciML:mainfrom
ChrisRackauckas-Claude:fix-deprecation-warnings
Feb 9, 2026
Merged

Fix deprecation warnings#439
ChrisRackauckas merged 1 commit intoSciML:mainfrom
ChrisRackauckas-Claude:fix-deprecation-warnings

Conversation

@ChrisRackauckas-Claude
Copy link

Summary

  • Remove duplicate initial condition for PT2 test (pt2.xd already included in unknowns(sys) .=> 0.0)
  • Remove bound parameter IC setting for PI/LimPI tests (gainPI.k is a bound parameter, can't set initial conditions on it)
  • Replace deprecated @mtkbuild with @mtkcompile in analog electrical tests (4 occurrences)
  • Fix deprecated integer indexing on DiffEqArray in hydraulic actuator test (initsol[1]initsol.u[end]), and provide all unknowns instead of just first
  • Remove unused deprecated imports (get_eqs, vars, @set!) in analysis points test
  • Fix linearize call to not wrap scalar analysis point inputs/outputs in vectors

Test Results

With JULIA_DEPWARN=error:

  • 577 passed, 0 failed, 6 errored, 3 broken
  • All 3 deprecation-specific test failures (PT2, PI, LimPI) are fixed
  • The 6 remaining errors are pre-existing upstream bugs in the Actuator System test (KeyError for port.ρ keys in initial_conditions dict) — these fail with or without JULIA_DEPWARN=error

Upstream Dependencies Needing Fixes

The following pre-existing issues are not caused by deprecation warnings but are blocking a fully clean test run:

  1. ModelingToolkitBase (initial_conditions dict): Bound port parameters like src.port.ρ, valve.port_s.ρ, etc. are no longer accessible via initial_conditions(sys) dict indexing — causes 6 KeyErrors in the Actuator System test
  2. SymbolicIndexingInterface: symbolic_container(::ModelingToolkitBase.IndexCache) method is missing — causes analysis points test failure (currently passing due to @test_broken or error being caught)
  3. RecursiveArrayTools: Base.getindex(VA::AbstractDiffEqArray, i::Int) is deprecated in favor of VA.u[i] — fixed in this PR for the one occurrence in test code

Test plan

  • Run JULIA_DEPWARN=error julia --project -e 'using Pkg; Pkg.test()'
  • Verify PT2, PI, LimPI tests pass (previously failed with DEPWARN=error)
  • Verify analysis points tests pass
  • Verify electrical analog tests pass with @mtkcompile
  • Run Runic.jl formatter

🤖 Generated with Claude Code

- Remove duplicate initial condition for PT2 test (pt2.xd already in unknowns)
- Remove bound parameter IC setting for PI/LimPI tests (gainPI.k is bound)
- Replace deprecated @mtkbuild with @mtkcompile in analog electrical tests
- Fix deprecated integer indexing on DiffEqArray in hydraulic actuator test
- Remove unused deprecated imports (get_eqs, vars, @set!) in analysis points test
- Fix linearize call to not wrap scalars in vectors

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas merged commit 3d1820b into SciML:main Feb 9, 2026
6 of 11 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.

3 participants