Skip to content

Restore the SciML common interface on using JumpProcesses - #635

Merged
ChrisRackauckas merged 2 commits into
masterfrom
restore-documented-reexports
Aug 23, 2026
Merged

ChrisRackauckas merged 2 commits into
masterfrom
restore-documented-reexports

Conversation

@ChrisRackauckas

@ChrisRackauckas ChrisRackauckas commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

What broke

fdfd104 ("Allow intentional public reexports in QA", #623) replaced

@reexport using DiffEqBase

with a plain using DiffEqBase. The reexports_allow list that commit
introduced only covered the five names JumpProcesses already exported itself:

const REEXPORTED_API = (:init, :solve, :solve!, :neighbors, :outdegree)

Everything else that using JumpProcesses used to put in scope silently
disappeared from the public surface: DiscreteProblem, ODEProblem,
SDEProblem, remake, the callbacks, the ensemble types, and the integrator
functions a jump affect! calls. The package's own tests never noticed because
the same commit added explicit using SciMLBase / using DiffEqBase lines to
them.

Evidence used to pick the names

  1. The stripping commit's own workarounds. It had to add using SciMLBase
    (and Pkg.add("SciMLBase")) to seven documentation pages -- simple_poisson_process.md,
    discrete_stochastic_example.md, jump_diffusion.md, point_process_simulation.md,
    spatial.md, faq.md, advanced_point_process.md -- and SciMLBase/DiffEqBase
    imports to ~25 files under test/. Those additions are a direct list of names
    that used to come from the reexport.
  2. Confirmed downstream breakage. MomentClosure.jl's Core test group started
    failing with UndefVarError for DiscreteProblem and EnsembleProblem, which it
    had been getting from using JumpProcesses. Fix Core test failure: import DiscreteProblem/EnsembleProblem from SciMLBase MomentClosure.jl#111 is a
    workaround that imports those two names from SciMLBase directly. That is this bug,
    observed in the wild.
  3. A token scan of docs/src/**/*.md and test/**/*.jl against
    setdiff(names(DiffEqBase), names(JumpProcesses)) (193 names lost). Hits in
    docs: ContinuousCallback, DiscreteCallback, DiscreteProblem,
    EnsembleProblem, ODEProblem, ODESolution, SDEProblem, remake. Hits
    in tests additionally: CallbackSet, DiscreteFunction, EnsembleSerial,
    EnsembleThreads, ODEFunction, ReturnCode, add_tstop!,
    derivative_discontinuity!, reinit!, savevalues!, set_u!, step!,
    terminate!.

Following the rule from SciML/Sundials.jl#553 -- reexport what normal
documented use needs, not whole dependencies -- this restores an explicit list
rather than the blanket reexport. The remaining ~155 DiffEqBase/SciMLBase names
(BVP/DAE/DDE/SDDE/optimization/nonlinear problem classes, traits, function
wrappers, internals) stay out.

Restored names

CallbackSet, ContinuousCallback, DiscreteCallback, DiscreteFunction,
DiscreteProblem, EnsembleAnalysis, EnsembleDistributed, EnsembleProblem,
EnsembleSerial, EnsembleSolution, EnsembleSplitThreads, EnsembleSummary,
EnsembleThreads, NullParameters, ODEFunction, ODEProblem, ODESolution,
ReturnCode, SDEFunction, SDEProblem, VectorContinuousCallback, add_saveat!,
add_tstop!, derivative_discontinuity!, reinit!, remake, savevalues!,
set_proposed_dt!, set_t!, set_u!, step!, successful_retcode, terminate!,
u_modified!

(init, solve, solve!, neighbors, outdegree were already exported and
are unchanged.)

Each is imported from its owner SciMLBase rather than through DiffEqBase's
re-export, and test/qa.jl's reexports_allow list is kept in sync with the
export block so it cannot drift.

The documentation pages go back to the documented using JumpProcesses.

Documentation

docs/src/api.md gains a Reexported SciML common interface section listing the
names grouped by role -- problems / functions / solutions / ensemble algorithms /
solving / integrator interface / return status / callbacks -- with SciMLBase named as
their owner and links to the upstream docs for each group. It closes with the explicit
boundary line, and notes that SSAStepper only supports DiscreteCallbacks so the
continuous callbacks are there for the ODE/SDE integrators a JumpProblem pairs with.

The docs list, the export block in src/JumpProcesses.jl and the REEXPORTED_API
tuple in test/qa.jl are now the same list in three places.

Why this is not breaking

Every name here was exported by using JumpProcesses before fdfd104.
Restoring previously-exported names is additive -- no existing code changes
meaning. Per the release process, no version bump is included here.

What was verified

  • julia --project=. -e 'using JumpProcesses' loads, and all restored names are
    present in names(JumpProcesses).
  • A documented end-to-end workflow (ConstantRateJump + DiscreteProblem +
    JumpProblem + solve(..., SSAStepper()), plus EnsembleProblem/
    EnsembleSerial and remake) runs from a bare using JumpProcesses.
  • test/qa.jl was run locally: "No unapproved public reexports" passes, as
    do all_explicit_imports_via_owners, all_qualified_accesses_via_owners,
    all_explicit_imports_are_public, Aqua and the public-API-documentation
    checks. The one erroring check, all_qualified_accesses_are_public, flags
    Base.Iterators.filter/map at src/spatial/topology.jl:128 -- untouched by
    this PR and failing on master the same way with the ExplicitImports version
    resolved locally.
  • The full test suite was not run locally (this machine is heavily loaded);
    CI covers it. This PR deliberately touches only src/, docs/ and the
    REEXPORTED_API constant in test/qa.jl, to stay out of the way of the
    in-flight InterfaceI test work.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Rmh6B9eoW3N8oCbuuVPVxJ

ChrisRackauckas and others added 2 commits August 23, 2026 17:43
`fdfd104` ("Allow intentional public reexports in QA", #623) replaced
`@reexport using DiffEqBase` with a plain `using DiffEqBase`, but the
`reexports_allow` list it introduced only covered the five names JumpProcesses
already exported on its own (`init`, `solve`, `solve!`, `neighbors`,
`outdegree`). Everything else that `using JumpProcesses` used to bring into
scope was dropped, so `DiscreteProblem`, `ODEProblem`, `SDEProblem`, `remake`,
the callbacks, the ensemble types and the integrator interface all became
`UndefVarError`s for downstream users.

The same commit is its own evidence: it had to add `using SciMLBase` (and
`Pkg.add("SciMLBase")`) to seven documentation pages and `SciMLBase`/
`DiffEqBase` imports to ~25 test files purely to keep them working.

Following the rule "reexport what is normal documented use, but not whole
dependencies" (SciML/Sundials.jl#553), add an explicit `export` list instead of
the blanket reexport:

  * the problem/function/solution types a `JumpProblem` wraps -- `DiscreteProblem`,
    `DiscreteFunction`, `ODEProblem`, `ODEFunction`, `ODESolution`, `SDEProblem`,
    `SDEFunction`, `remake`, `NullParameters`;
  * the callbacks -- `CallbackSet`, `ContinuousCallback`, `DiscreteCallback`,
    `VectorContinuousCallback`;
  * the ensemble interface -- `EnsembleProblem`, `EnsembleSolution`,
    `EnsembleSummary`, `EnsembleAnalysis` and the four ensemble algorithms;
  * the integrator interface a jump `affect!` drives -- `add_tstop!`,
    `add_saveat!`, `savevalues!`, `set_proposed_dt!`, `set_t!`, `set_u!`,
    `reinit!`, `step!`, `terminate!`, `u_modified!`,
    `derivative_discontinuity!`;
  * `ReturnCode` and `successful_retcode`.

The names are now imported from their owner `SciMLBase` rather than through
DiffEqBase's re-export, the allow-list in `test/qa.jl` is kept in sync with the
`export` block, and the documentation pages go back to the documented
`using JumpProcesses`.

Restoring previously exported names is additive, so this is not breaking.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude <[email protected]>
Claude-Session: https://claude.ai/code/session_01Rmh6B9eoW3N8oCbuuVPVxJ
Add a "Reexported SciML common interface" section to docs/src/api.md listing the
names `using JumpProcesses` provides on top of its own API, grouped by role
(problems, functions, solutions, ensemble algorithms, solving, integrator
interface, return status, callbacks) with SciMLBase named as their owner and
links to the upstream documentation for each group.

The section states the boundary explicitly -- everything else from SciMLBase must
be imported from SciMLBase directly -- and notes that `SSAStepper` only supports
`DiscreteCallback`s, so the continuous callbacks are re-exported for the ODE/SDE
integrators a `JumpProblem` can be paired with.

The docs list, the `export` block in src/JumpProcesses.jl and the
`REEXPORTED_API` tuple in test/qa.jl are now the same list in three places, so a
future QA sweep can see the surface is deliberate.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude <[email protected]>
Claude-Session: https://claude.ai/code/session_01Rmh6B9eoW3N8oCbuuVPVxJ
@ChrisRackauckas
ChrisRackauckas merged commit c93b407 into master Aug 23, 2026
11 of 13 checks passed
@ChrisRackauckas
ChrisRackauckas deleted the restore-documented-reexports branch August 23, 2026 22:17
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.

1 participant