Skip to content

Fix minimum version bounds and NullParameters bug#29

Draft
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:fix-min-versions-20251228-225800
Draft

Fix minimum version bounds and NullParameters bug#29
ChrisRackauckas-Claude wants to merge 1 commit 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
first and then use that to create `ODEProblem`s.
"""
function DiffEqBase.ODEProblem(sys::FSPSystem, u0, tint, pmap = NullParameters())
function DiffEqBase.ODEProblem(sys::FSPSystem, u0, tint, pmap = DiffEqBase.NullParameters())

@ChrisRackauckas ChrisRackauckas Dec 29, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function DiffEqBase.ODEProblem(sys::FSPSystem, u0, tint, pmap = DiffEqBase.NullParameters())
function SciMLBase.ODEProblem(sys::FSPSystem, u0, tint, pmap = SciMLBase.NullParameters())

Comment thread src/build_rhs_ss.jl
Return a `SteadyStateProblem` for use in `DifferentialEquations.
"""
function DiffEqBase.SteadyStateProblem(sys::FSPSystem, u0, pmap = NullParameters())
function DiffEqBase.SteadyStateProblem(sys::FSPSystem, u0, pmap = DiffEqBase.NullParameters())

@ChrisRackauckas ChrisRackauckas Dec 29, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function DiffEqBase.SteadyStateProblem(sys::FSPSystem, u0, pmap = DiffEqBase.NullParameters())
function SciMLBase.SteadyStateProblem(sys::FSPSystem, u0, pmap = SciMLBase.NullParameters())

@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
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