Define the independent variable in the motor test#483
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Investigation scratchpad
|
Depend directly on ModelingToolkitBase public API instead of receiving the macro through ModelingToolkit re-export. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
API-source follow-up at
The PR body and CI now point at the final head. |
|
CI mapping: the downgrade failure is the already-audited ModelingToolkitBase 1.0 symbolic-array indexing defect, not the motor test change. It passes |
|
CI mapping for the newly completed red jobs:
Neither failure implicates this PR’s direct owner import; the exact downgraded and current motor tests both pass 6/6 locally. |
Summary
@independent_variablesmacrot, which is aPleaseImportDynamicQuantitiessentinel when DynamicQuantities is absent from the minimum dependency environmentFinal head:
015b399e, based on upstreamd0243bd3.Root cause
The motor test was the only top-level test using
@mtkmodelwithout defining or importingt. SciCompDSL therefore fell back toModelingToolkitBase.t. With ModelingToolkit 11.2.0, ModelingToolkitBase 1.0.0, and SciCompDSL 1.0.1, that fallback isModelingToolkitBase.PleaseImportDynamicQuantities()unless the DynamicQuantities extension is loaded, and@mtkcompile motor = ThermalMotor()fails in_check_if_dde.A source-history bisect isolated the DynamicQuantities extension boundary:
2785a86207f9d96fbe4f9395a4346228a43e8dd3(refactor: move DynamicQuantities to extension)ce0436f48c25553bcaa3b6bcd6421d1095e98bd1(refactor: move DiffEqNoiseProcess to extension)The historical parent cannot currently be instantiated from the registry because its intermediate SymbolicUtils 4 / Symbolics 6 constraints are unsatisfiable. The released failing dependency stack above was reproduced directly.
@independent_variablesis exported by its owner ModelingToolkitBase, has an owner docstring inlib/ModelingToolkitBase/src/independent_variables.jl, and is included in the rendered API reference. ModelingToolkitBase is already a direct dependency of this package.Local verification
_check_if_dde(::Vector{Equation}, ::ModelingToolkitBase.PleaseImportDynamicQuantities, ::Vector{System})OrdinaryDiffEqpreloaded as in native tests:Thermal Motor Demo | Pass 6 / Total 6(143.3 s, including first-use work)Thermal Motor Demo | Pass 6 / Total 6(137.0 s, including first-use work)GROUP=Coreon current upstream passed throughCore/isothermal_compressible.jl(27/27), then stopped at the separately audited exact-equality assertion intest/magnetic.jl:66(2 passed, 1 failed), before reaching motor; the focused runs above execute motor end-to-endgit diff --check: exit 0No test is skipped, disabled, loosened, or made warn-only by this PR.
Independent minimum-compatibility blocker
On current upstream, the downgrade workflow reaches an earlier ModelingToolkitBase 1.0 array-codegen failure in
test/continuous.jlbefore motor. Focused draft #482 raises the ModelingToolkitBase floor to 1.1 and validates continuous 76/76. That independent fix is deliberately not duplicated here; the exact minimum-stack focused motor run above verifies this PR's test after preloading the native solver stack.