Qualify clock operators in subsystem isolation - #4988
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
Closed
Qualify clock operators in subsystem isolation#4988ChrisRackauckas-Claude wants to merge 1 commit into
ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Member
|
Instead make Operator public. |
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.
Ignore this PR until it has been reviewed by @ChrisRackauckas.
What changed
isolate_subsystemnow recognizes ModelingToolkit's clock operators through their public owning modules:Symbolics.DifferentialandModelingToolkitBase.{Shift,Sample,Hold,SampleTime}. This restores clock propagation without reintroducing the accidental module-globalOperatorbinding or depending on the non-publicSymbolicUtils.Operatortype.The existing
Clock information inferred from removed sections is retainedregression test is the discriminator; no duplicate test was added.Root cause and bisect
The clock-retention implementation introduced an unqualified
Operatorreference in commit313cc258c84544a5d32a8c487b8f40bf8371c174. It happened to resolve throughusing SymbolicUtils: Operatorin another included source file.Commit
03c130782349ca8ed91e4f9a92da08d590c53ffecorrectly removed that incidental import while making dependency imports owner-qualified. Its parent,64ced006057dfef83d26f8941767c2a74653e1e6, reportsisdefined(ModelingToolkit, :Operator) == truelocally and had green InterfaceII jobs on Julia LTS/current/pre. Clean current master and both PR routes fail with the sameUndefVarErroron all three Julia versions.An API audit on Julia 1.12 confirmed that all five concrete types used here are public and exported by their owning modules.
Base.ispublic(SymbolicUtils, :Operator)andBase.isexported(SymbolicUtils, :Operator)are bothfalse, so qualifying the old abstract type asSU.Operatorwould still depend on an internal API.Verification
Failing before, on clean master SHA
3fe375e19031102e95c7775c4d8a6aac9895767b:Passing after:
After rebasing onto
29f589e204ca80cfe550af04c49a6f3010bf92d5(which only changed three InterfaceI test files), the standalone form of the same clock-retention reproducer also passed:Additional gates:
Documentation was not built because this changes neither documentation nor public API. Julia LTS and pre-release were not run locally; CI covers those lanes.
Links