Skip to content

Fix minimum version bounds and NullParameters bug#29

Merged
ChrisRackauckas merged 3 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix-min-versions-20251228-225800
Jun 26, 2026
Merged

Fix minimum version bounds and NullParameters bug#29
ChrisRackauckas merged 3 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix-min-versions-20251228-225800

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Dec 29, 2025

Copy link
Copy Markdown
Contributor

Summary

Two genuine fixes that let FiniteStateProjection build and pass its test suite on Julia 1.10 through 1.12:

  1. NullParameters qualification (build_rhs.jl, build_rhs_ss.jl) — NullParameters is not exported from DiffEqBase, so the unqualified default-argument reference (pmap = NullParameters()) is an UndefVarError waiting to happen. Qualified as DiffEqBase.NullParameters().

  2. DiffEqBase compat floor — bumped to 6.165 to match what Catalyst 15 actually requires transitively, so the stated minimum is resolvable.

  3. Julia 1.12 MacroTools.prettify crash (build_rhs.jl, build_rhs_ss.jl) — the RHS builders piped the generated expression through MacroTools.prettify, which calls unresolveunresolve1(f::Function) = methods(f).mt.name. On Julia 1.12 this throws FieldError: type Base.MethodList has no field mt because the mt field was removed. The latest registered MacroTools (0.5.16) still contains this unguarded code; the upstream fix (Fix Julia 1.12 compatibility for MethodList API change FluxML/MacroTools.jl#217) is merged to master only and has not been released (master Project.toml still says 0.5.16).

    Rather than block on an unreleased upstream package, this fixes the real cause in-repo: the unresolve pass only rewrites interpolated Function values to their symbolic names for display — it is unnecessary for expressions compiled via @RuntimeGeneratedFunction. A local prettify_rhs applies the same cosmetic transforms (flatten, resyntax, alias_gensyms) but skips unresolve, so FSP works on Julia 1.12 with any MacroTools 0.5.x.

Verification (run locally)

  • Julia 1.12.6: Pkg.test() — Telegraph 17/17, FeedbackLoop 12/12, BirthDeath2D 18/18, "tests passed". (Previously errored with the Base.MethodList FieldError.)
  • Julia 1.10.11 (floor): Pkg.test() — Telegraph 17/17, FeedbackLoop 12/12, BirthDeath2D 18/18, "tests passed". No regression.

This PR should be ignored until reviewed by @ChrisRackauckas.

🤖 Generated with Claude Code

Comment thread src/build_rhs.jl Outdated
Comment thread src/build_rhs_ss.jl Outdated
@ChrisRackauckas-Claude ChrisRackauckas-Claude marked this pull request as draft June 16, 2026 13:11
- Update DiffEqBase minimum version from 6 to 6.165
  - Catalyst 15 requires DiffEqBase >= 6.165, so the previous bound was too low
- Fix unqualified NullParameters reference in build_rhs.jl and build_rhs_ss.jl
  - NullParameters is not exported from DiffEqBase, so it must be qualified as
    DiffEqBase.NullParameters()

Note: Tests require MacroTools >= 0.5.17 (unreleased) or master for Julia 1.12
compatibility due to MethodList API changes in Julia 1.12.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ChrisRackauckas-Claude ChrisRackauckas-Claude force-pushed the fix-min-versions-20251228-225800 branch from 2efc907 to 52a5873 Compare June 23, 2026 01:53
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 26, 2026 11:35
@ChrisRackauckas ChrisRackauckas merged commit 6f4a4a5 into SciML:main Jun 26, 2026
4 of 6 checks passed
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/FiniteStateProjection.jl that referenced this pull request Jul 3, 2026
Resolve the Project.toml [compat] conflict by keeping the PR's
SparseArrays = "1" entry (added so Aqua deps_compat stops flagging the
missing bound) alongside main's SteadyStateDiffEq = "2.5" / DiffEqBase =
"6.165, 7" floors and the v0.3.4 release bump from SciML#62/SciML#63.

main's SciML#29 already re-qualified the FSP method extensions to
SciMLBase.ODEProblem / SciMLBase.SteadyStateProblem with
SciMLBase.NullParameters() defaults; those forms come in via the merge.
The run_qa NullParameters ignore added here stays correct: NullParameters
is still non-public in the Catalyst-15-pinned SciMLBase 2.153.1, so the
all_qualified_accesses_are_public check still flags the SciMLBase.NullParameters
qualified access.

Verified on Julia 1.12.6 against the merged tree with released
SciMLTesting 1.7.0 / JET 0.11.5 / ExplicitImports 1.15.0 (resolved
Catalyst 15.0.11, SciMLBase 2.153.1): Quality Assurance 13 Pass, 5 Broken,
0 Fail, 0 Error.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.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