Skip to content

Fix the Documentation build under ModelingToolkit v11 - #68

Open
ChrisRackauckas-Claude wants to merge 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix-docs-mtk-v11
Open

Fix the Documentation build under ModelingToolkit v11#68
ChrisRackauckas-Claude wants to merge 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix-docs-mtk-v11

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Summary

The Documentation workflow has been red since MTK v11 became resolvable in docs/Project.toml (the v9 cap from #64 was undone by the dependency bump in #65). Rather than capping again, this migrates the lecture examples to the current APIs. Root causes, in order of how many blocks they broke:

  • The @mtkmodel/@connector component DSL now lives in SciCompDSL.jl, so lecture 1 needs using SciCompDSL.
  • DifferentialEquations v8 no longer re-exports the solvers and initialization algorithms used here, so NewtonRaphson, DFBDF, ImplicitEuler, ShampineCollocationInit and NLNewton need NonlinearSolve, OrdinaryDiffEqBDF, OrdinaryDiffEqSDIRK and OrdinaryDiffEqNonlinearSolve.
  • ModelingToolkit.missing_variable_defaults and ModelingToolkit.defaults were removed; problems now take a symbolic operating-point map, and defaults are split into bindings and initial_conditions.
  • A symbolic default such as @variables x(t) = x₀ is now a binding, which cannot be overridden by a later u0. Where the lectures deliberately override those states (restarting from a previous solve), the values are passed via the initial_conditions keyword instead.
  • MTKStandardLibrary constructor changes: Mass no longer takes v, MassFlow no longer takes p_int, Open takes p, and HydraulicPort no longer takes p_int.
  • sol.destats is now sol.stats, and integer indexing of a solution (sol[2]) is element-wise, so the state after one step is sol.u[2].
  • Flattened variable names containing (the namespace separator) silently lose their defaults, so the hydraulic debugging model in lecture 6 uses _ instead. That model is also rewritten in the functional ODESystem style already used by the rest of the lecture, since @mtkmodel System now collides with ModelingToolkit.System.

The Volume component that lecture 6 already carried locally is now also used by lecture 2, whose IsothermalCompressible.Volume usage no longer matches the library version.

Test plan

  • julia --project=docs docs/make.jl equivalent run locally (Documenter 1.17, MTK v11.40, MTKStandardLibrary v2.29.7): all pages expand, no @example/@repl failures and no Documenter errors. linkcheck was disabled locally since the sandbox has no outbound network; CI still runs it.
  • Pkg.resolve() on docs/ succeeds with the updated compat bounds.

Made with Cursor

ChrisRackauckas and others added 2 commits August 26, 2026 08:41
The Documentation build has been failing since MTK v11 became resolvable in
the docs environment: the component DSL moved to SciCompDSL.jl, solvers are no
longer re-exported by DifferentialEquations v8, `missing_variable_defaults` and
`defaults` were removed, several standard-library components changed their
constructor signatures, and symbolic defaults are now bindings rather than
initial conditions. This updates the lecture examples to the current APIs so
`makedocs` runs every `@example` block again, instead of capping MTK to v9.

The hydraulic debugging model in lecture 6 is rewritten in the same functional
`ODESystem` style used by the rest of that lecture, and its flattened variable
names use `_` instead of the `₊` namespace separator, which MTK now strips
defaults from.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants