Repository navigation
Enforce strict SciMLTesting 2.4 QA - #98
ChrisRackauckas merged 2 commits into
Conversation
Co-Authored-By: Chris Rackauckas <[email protected]>
|
LTS fail |
`Base.ispublic` and the `public` keyword are Julia 1.11+, so the check errored on 1.10 (both the LTS and Downgrade jobs run on `lts`). Guard it and assert the name is defined on all versions. Also replace the docstring check: `Base.Docs.doc(mod, name)` reads `name` as a type signature and returns the module's own docstring, so it never detected a missing one. Query the binding in the module's doc metadata instead, and cover it with a negative case. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_0117aJvytDT3y2jMi5Ng6Q5m
|
Fixed the LTS failure in 9e7a9a7. Root cause. The Second defect found while fixing it. The docstring assertion was vacuous. julia> module Foo; bar() = 1; end # bar is undocumented
julia> Base.Docs.doc(Foo, :bar) !== nothing
true
julia> Base.Docs.doc(Foo, :nope) !== nothing # not even defined
trueReplaced with a binding lookup in the module's doc metadata, which discriminates correctly on 1.10, 1.11 and 1.12, plus a negative case so the assertion cannot silently go vacuous again: hasdocstring(mod, name) = haskey(Base.Docs.meta(mod), Base.Docs.Binding(mod, name))Verified locally with
The 31 vs 46 split is the guard working as intended: 15 Ignore until reviewed by @ChrisRackauckas. |
|
CI update: the LTS and Downgrade jobs are now green, along with Core on julia 1/pre, QA, Docs, Runic and SpellCheck. Run: https://github.com/SciML/PDEBase.jl/actions/runs/30340934982 However, all 15 downstream jobs went red in this run, and they are not caused by 9e7a9a7 (test-only) — they were already broken by this PR and were being silently swallowed until yesterday. What changed. Now the same Single root cause for all 15. This PR bumps Widening compat alone will not fix it. The bump is genuinely breaking, so 0.2.0 is the correct SemVer, but MethodOfLines reads the metadata key this PR renamed.
With compat widened but no code change, I have not touched MethodOfLines.jl — how to sequence that is your call. Ignore until reviewed by @ChrisRackauckas. |
|
Why it was done. It is a consequence of emptying the QA ignore list. On master Why that is not a faithful local copy.
So PDEBase was deliberately using that slot to ferry Measured, same heat-equation script, only PDEBase swapped (MethodOfLines compat locally widened so both resolve, Julia 1.12.6):
That is the entire MethodOfLines solution interface. The downstream jobs did not catch it because they die at resolution before running a line of MOL test code; widening compat alone would turn 15 resolver errors into a large number of genuine test failures. This is on top of the three direct reads of the old key in MethodOfLines ( Suggested fix. Keep Happy to open the ModelingToolkitBase PR if you want to go that way. Ignore until reviewed by @ChrisRackauckas. |
|
Pushed 20f2401 reverting the metadata key, and opened the upstream PR. Upstream: SciML/ModelingToolkit.jl#4842 marks Here: Verified the revert restores the solution interface, same script as before:
PDEBase Correction to my earlier comment: I speculated the 0.2.0 bump might not be needed once the rename was reverted. That is wrong — 0.2.0 is correct, for a reason unrelated to the metadata key. Switching # MethodOfLines.jl/src/MethodOfLines.jl
28: using PDEBase: Interval
43: import PDEBase.symbolic_discretizeOn this branch both So MethodOfLines fails to load outright on the Julia LTS against PDEBase 0.2.0. Dropping the re-export shim is the right call — MethodOfLines should take Still needed for green downstream: a MethodOfLines.jl PR doing (a) compat Ignore until reviewed by @ChrisRackauckas. |
SciML#98 rewrote `chain_flatten_array_variables` to avoid a QA ignore for `Chain` and `Prewalk`. The rewrite keyed its replacement map on the array operation alone, so every `u[i]` overwrote the previous entry and all indices collapsed onto the last one, and it built replacements with `Symbolics.variable(...; T = symtype(name))`, which yields an array-valued variable rather than a callable. The resulting `Arr` reached `get_ops`, so discretizing any `PDESystem` written against `@variables (u(..))[1:N]` failed with `MethodError: operation(::Symbolics.Arr{Num, 1})`. The ignore was avoidable without touching this code: `Chain` and `Prewalk` are public in `SymbolicUtils.Rewriters`, which owns them, and were only non-public via the parent `SymbolicUtils`. Import them from the owner and restore the previous implementation, which shipped in 0.1.30. Fixes SciML#100 Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_0117aJvytDT3y2jMi5Ng6Q5m
#98 rewrote `chain_flatten_array_variables` to avoid a QA ignore for `Chain` and `Prewalk`. The rewrite keyed its replacement map on the array operation alone, so every `u[i]` overwrote the previous entry and all indices collapsed onto the last one, and it built replacements with `Symbolics.variable(...; T = symtype(name))`, which yields an array-valued variable rather than a callable. The resulting `Arr` reached `get_ops`, so discretizing any `PDESystem` written against `@variables (u(..))[1:N]` failed with `MethodError: operation(::Symbolics.Arr{Num, 1})`. The ignore was avoidable without touching this code: `Chain` and `Prewalk` are public in `SymbolicUtils.Rewriters`, which owns them, and were only non-public via the parent `SymbolicUtils`. Import them from the owner and restore the previous implementation, which shipped in 0.1.30. Fixes #100 Claude-Session: https://claude.ai/code/session_0117aJvytDT3y2jMi5Ng6Q5m Co-authored-by: ChrisRackauckas-Claude <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Summary
Validation
Pkg.test()run_qa(PDEBase)checkdocs = :exportsIgnore until reviewed by @ChrisRackauckas.