Restore the intentional MiscSystemData and generate_trajectory exports - #5009
Merged
ChrisRackauckas merged 2 commits intoAug 22, 2026
Conversation
Both names were deliberately exported by their authors: `MiscSystemData` in b79914d as the user-facing key for one-off system metadata, and `generate_trajectory` in 5be3f9e alongside the rest of the exported `generate_*` codegen family. 735a4e0 reclassified them as accidental internal reexports and dropped both, which removed public API in a minor release and broke downstream use. Restore the exports, document them on the public API pages rather than under the internals "Internal API" banner, and drop the QA testset that asserted they were internal. The collocation `solve` method moves from the same internals section to the dynamic optimization page it belongs to. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Restoring two exports widens the public API, which is a minor bump. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
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 and why
MiscSystemDataandgenerate_trajectorywere both deliberately exported by the contributors who added them; #4962 reclassified them as accidental internal reexports and removed both exports, which dropped public API in a minor release. This restores the exports, documents both names on the public API pages instead of the internals page, and removes the QA testset that asserted they were internal.MiscSystemData— added and exported in b79914d by @AayushSabharwal as the user-facing key for one-off system metadata (setmetadata(sys, MiscSystemData, x)).generate_trajectory— added and exported in 5be3f9e alongside the rest of the exportedgenerate_*codegen family (generate_cost,generate_jacobian,generate_control_function, …).#4979 then filed both docstrings under
docs/src/internals/systems.md, whose page banner reads "These APIs may change without notice" — the wrong home for exported API. They move to the pages their siblings live on:MiscSystemDatanext to the systemsetmetadata/getmetadataentries inAPI/System_accessors.md,generate_trajectoryintoAPI/codegen.md. The collocationsolvemethod that #4979 filed in the same internals section moves toAPI/dynamic_opt.md, the page that documents that exact workflow.ModelingToolkitBase goes 1.67.0 → 1.68.0, in its own commit: widening the public API is a minor bump.
This is the upstream half of SciML/Catalyst.jl#1538, where @AayushSabharwal flagged that
MiscSystemDatais intentionally exported. No Catalyst follow-up is needed — itsLEGACY_DEPENDENCY_REEXPORTSallowlist already carries both names.Failing before / passing after
MWE run against the working tree, Julia 1.12.4:
On unmodified master (837ca4d):
With this PR applied:
Verification
GROUP=QAon this branch, Julia 1.12.4 — the Aqua / ExplicitImports /public_reexportslane, which is what actually asserts that these two names are deliberate API rather than leaked internals:Same lane on unmodified master (837ca4d), for the baseline:
Both are green. The 52 → 40 drop is exactly the deleted testset: 6 assertions (
isdefined,!isexported,!ispublic, each against ModelingToolkitBase and ModelingToolkit) × 2 names. Nothing else was removed or loosened — in particularpublic_reexportsstill runs and now passes with both names back inREEXPORTED_API.Docs build (
checkdocs = :exports,doctest = true,linkcheck = true) — this is the check that gates the restored exports having rendered docs entries, since an exported name with no@docsentry failsCheckDocument:The only warnings are the pre-existing ones on master:
size_threshold_warnon three large API pages, the 60@exampletext/htmlnotice, and two linkcheck 301 redirects (claytex.com, codecov.io).Runic (
--check --diff,@runicenv),typosover the added diff lines, andgit diff --checkall pass.Not verified
VERSION >= v"1.11"-gated code touched here, so there is no version-specific branch left in the diff, but I did not run the LTS lane.InterfaceI,InterfaceII,Initialization, …). This diff adds twoexportlines, moves docs entries, and deletes a QA testset; it changes no solver or codegen behaviour, so I ran the lanes that can actually observe it (QA, docs) rather than the full matrix.Anything a reviewer should push back on
generate_trajectoryshould be exported at all, or only@public. It was exported by its author and every neighbouringgenerate_*entry point is exported, so this restores it as an export; if the intent was developer-only,@publicplus a docs entry would be the alternative and that is a judgement call, not a mechanical one.[compat]floor on ModelingToolkitBase is left at"1.64". Only the 1.66/1.67 window lacks these exports, and MTK/MTKBase release in lockstep from this monorepo, so raising the floor to"1.68"seemed like more churn than the two-version gap warrants. Say the word if you would rather pin it.