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.
This is used for the exported Algebraic Data Type (ADT)
TimeDomain
.Closes #741 which wasn't merged due to invalidations caused by newer Expronicon releases. Moshi is the replacement by the same author that fixes this issue. It is a different design so some care is taken to minimize disruption.
One benefit of this change is that it removes these dependencies from SciMLBase: Pkg, Expronicon, MLStyle, ArgTools, Downloads, FileWatching, InteractiveUtils, LibCURL, REPL, Tar, LibCURL_jll, MozillaCACerts_jll, Zlib_jll, nghttp2_jll, p7zip_jll
Moshi only depends on ExproniconLite and Jieko.
One of the differences between Expronicon and Moshi is that the former ADT macro creates a type, whereas the latter creates a module with the Type in there. Since the ADT was manually placed in the
Clocks
module, I could just rename the ADT to the moduleClocks
, and the old ADT name is kept asconst TimeDomain = Clocks.Type
. With thatTimeDomain
can still be used for dispatch or container typing like is done in ModelingToolkit.The
DiscriminatorType
code was only added for Clock serialization in #753, but that now works without extra code.The biggest change that I couldn't work around is that
Continuous
andSolverStepClock
, both singleton variants, should now be explicitly constructed withContinuous
instead ofContinuous()
. My idea was to land and release #921 first, so that ModelingToolkit can update to this new syntax, and then merge this next. Though if you prefer to just update both SciMLBase and ModelingToolkit together then #921 wouldn't be needed.EDIT: This is a draft because this will break MTK unless SciML/ModelingToolkit.jl#3353 is merged and released first.