Skip to content

Construct NonlinearSolution without spelling out its type parameters - #1214

Closed
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:nonlinearsolution-layout
Closed

ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:nonlinearsolution-layout

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Aug 29, 2026

Copy link
Copy Markdown
Member

Draft. Ignore this PR until reviewed by @ChrisRackauckas.

What changed and why

SciML/SciMLBase.jl#1563 appends a retcode type parameter to NonlinearSolution, and the three places in this repo that spell out all of its parameters then fail to precompile — which is what #1563's downstream and docs lanes currently show. This makes those sites layout-agnostic so they work with both the released SciMLBase and #1563:

  • build_solution_less_specialize (lib/NonlinearSolveBase/src/polyalg.jl) and the SCC solution element type pick the layout once at load time via fieldtype(SciMLBase.NonlinearSolution, :retcode).
  • nonlinear_solution_new_alg (lib/SimpleNonlinearSolve/src/utils.jl) uses the positional constructor, which computes the same parameters.

Patch bumps (rebased onto master after the 2.49.0 / 1.15.2 releases): NonlinearSolveBase 2.49.1, SCCNonlinearSolve 1.15.3, SimpleNonlinearSolve 2.14.2. Intended to merge and be released before #1563; carved out of #1197, which will be rebased on it.

Verification

Julia 1.12.4, each sublibrary's own project with the local NonlinearSolveBase developed in:

GROUP=Core  NonlinearSolveBase      Testing NonlinearSolveBase tests passed
GROUP=Core  SCCNonlinearSolve       Testing SCCNonlinearSolve tests passed
GROUP=Core  SimpleNonlinearSolve    Testing SimpleNonlinearSolve tests passed

The same code precompiles and passes the NonlinearSolve Reactant test group against #1563 (that run is in #1197). Runic-formatted; typos clean.

Not verified

  • QA groups (the change adds no imports or public names); GPU groups.

🤖 Generated with Claude Code (model: claude-fable-5) on behalf of Chris Rackauckas. Session: https://claude.ai/code/session_016LsC6pp9z6s5EABX9DnVjE

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

CI triage: the only red lane is lib/SimpleNonlinearSolve [QA], failing Aqua's Persistent tasks check (a timing-based check unrelated to the constructor change). The same lane flips on master: failure on SublibraryCI run 33157989116, success on 33157109972. Locally the QA group of SimpleNonlinearSolve passes with these sources (see #1197). I cannot rerun the job from this account.

🤖 Posted by an AI agent (Claude Code, model claude-fable-5) on behalf of Chris Rackauckas. Session: https://claude.ai/code/session_016LsC6pp9z6s5EABX9DnVjE

SciMLBase/SciMLBase.jl#1563 appends a `retcode` type parameter to
`NonlinearSolution`. The three places that wrote out all parameters
(`build_solution_less_specialize`, the SCC solution element type and
`nonlinear_solution_new_alg`) now pick the layout at load time or use the
positional constructor, so they work with both the released and the new
SciMLBase.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.251
Agent-Model: claude-fable-5
Agent-Session: https://claude.ai/code/session_016LsC6pp9z6s5EABX9DnVjE
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

CI triage: the three red OrdinaryDiffEq.jl/* downstream lanes fail during environment resolution, not in tests — Unsatisfiable requirements detected for package TimerOutputs: NonlinearSolveBase's compat TimerOutputs = "1" (unchanged here) versus AlgebraicMultigrid's requirement in OrdinaryDiffEq's downstream environment. Nothing in this PR touches dependencies or compat other than the three patch version bumps; the same environment resolves the same way for any current branch (the equivalent lanes on #1197/#1213 are still running). Everything else is green.

🤖 Posted by an AI agent (Claude Code, model claude-fable-5) on behalf of Chris Rackauckas. Session: https://claude.ai/code/session_016LsC6pp9z6s5EABX9DnVjE

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Rebased onto master after the 2.49.1 release (#1221): NonlinearSolveBase is now bumped to 2.49.2 here, the same version #1223 (TimerOutputs compat fix for the master downstream failure) bumps to; whichever merges first, the other needs a one-line rebase.

🤖 Posted by an AI agent (Claude Code, model claude-fable-5) on behalf of Chris Rackauckas. Session: https://claude.ai/code/session_016LsC6pp9z6s5EABX9DnVjE

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