Repository navigation
Fix Moshi bare-singleton deprecation warning on v2-backport - #1481
ChrisRackauckas merged 1 commit into
Conversation
Moshi v0.3.11 deprecated the bare singleton variant syntax inside `@data`, so
precompiling SciMLBase v2 emitted
Warning: the bare singleton variant syntax `ContinuousClock` is deprecated,
write `ContinuousClock()` instead (near .../src/clock.jl:4)
Explicit `Name()` variants only parse on Moshi v0.3.11 or newer, so the compat
floor moves with the syntax.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
CI triageDownstream CI finished with 3 failures. All three are pre-existing on
StochasticDiffEq — the only one not already red on #1452
Reproduced locally on Julia 1.10.11 with StochasticDiffEq master + Byte-identical to CI. This is an Catalyst / StochasticDelayDiffEqLatest downstream releases expect v3-era APIs that v2 does not have:
This is the expected consequence of running a legacy branch's downstream matrix against current releases. The |
Please ignore until reviewed by @ChrisRackauckas.
Fixes the precompilation warning reported at https://discourse.julialang.org/t/warning-in-scimlbase-about-continousclock/138534:
Root cause
Moshi v0.3.11 (Roger-luo/Moshi.jl#80, 2026-07-12) deprecated the bare singleton variant syntax inside
@dataand requiresName().src/clock.jlonv2-backportdeclaresContinuousClockandSolverStepClockin the bare form, and the v2 compat entryMoshi = "0.3.6"resolves to v0.3.12, so every user on SciMLBase v2 now gets this warning on precompile. Only one warning shows becauseBase.depwarndedupes on(caller frame, funcsym)—SolverStepClockhas the same problem.master(v3) is unaffected: Moshi was dropped entirely in 2837095 ("Replace Moshi with plain Julia structs for Clocks", v3.0.0). Verified — a fresh env with SciMLBase v3.40.0 precompiles clean.Other Moshi users in the ecosystem (ModelingToolkitBase's
MissingGuessValue/StructuralHint, SymbolicUtils'BasicSymbolicImpl) already use the explicit form, so this is the only offender.Fix
ContinuousClock→ContinuousClock(),SolverStepClock→SolverStepClock(). The explicit form throwsArgumentError: missing fields in variant expressionon Moshi < 0.3.11, so the compat floor moves to0.3.11alongside the syntax. All@matchpatterns inclock.jlalready usedName()and are unchanged.Test
Added a regression test that force-recompiles SciMLBase in a subprocess and asserts no deprecation output — the warning is emitted during macroexpansion, so it is invisible unless the package is actually recompiled.
Verified locally on Julia 1.11.9 with Moshi v0.3.12:
Base.compilecacheoutput is empty and clock behavior is identical (iscontinuous,issolverstepclock,isclock,iseventclock,is_discrete_time_domain,first_clock_tick_time,==,hash,clock()all as before).GROUP=Core Pkg.test()passes:Clocks | 38 pass, 1 broken (pre-existing),Remake | 4414 pass, full group green.Expression: !(occursin("deprecated", output))→Clocks | 37 pass, 1 fail, 1 broken.--checkclean on both changed files.Note
Version bumped to 2.155.2. This needs a release off
v2-backportto actually reach the users hitting it; if v2 is no longer being registered, the alternative answer for them is to upgrade to SciMLBase v3.🤖 Generated with Claude Code
https://claude.ai/code/session_01SwhhJmoj8GGx2i2vJ6Rnba