Skip to content

Allow intentional public reexports in QA - #623

Merged
ChrisRackauckas merged 4 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/allow-intentional-public-reexports
Aug 14, 2026
Merged

ChrisRackauckas merged 4 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/allow-intentional-public-reexports

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

Important

Please ignore this PR until it has been reviewed by @ChrisRackauckas.

What changed

  • Retains the test-only SciMLTesting compatibility update to 2.8.
  • Removes @reexport using DiffEqBase and the direct Reexport dependency.
  • Replaces the dynamic DiffEqBase-derived QA approval with the reviewed, literal list: (:init, :solve, :solve!, :neighbors, :outdegree).
  • Updates documented examples to import SciMLBase directly and adds it to the docs environments.
  • Repairs every non-GPU test that constructed DiscreteProblem or DiscreteFunction through the former JumpProcesses facade. The package source now imports DiscreteProblem directly from its owner, SciMLBase.

init, solve, and solve! remain explicitly exported solver entry points. neighbors and outdegree remain the Graphs generic functions extended for JumpProcesses spatial grids. No other DiffEqBase facade binding is public from JumpProcesses.

DiscreteProblem classification

DiscreteProblem and DiscreteFunction are public SciMLBase constructors. They are inputs to the documented JumpProcesses workflow, not JumpProcesses API. The revised tutorials explicitly install and load the owner with using JumpProcesses, SciMLBase.

Accordingly, this PR does not reexport DiscreteProblem. The direct owner check confirms SciMLBase.DiscreteProblem is public, JumpProcesses.DiscreteProblem is not exported, and its binding is owned by SciMLBase.

Regression evidence

Removing the blanket reexport exposed test files that had imported only JumpProcesses:

  • Interface I failed at test/functionwrappers.jl:14 with UndefVarError: DiscreteProblem not defined.
  • Interface II failed at test/ensemble_uniqueness.jl:8 with the same error.
  • After those two direct imports, Interface II exposed DiscreteFunction missing in test/jprob_symbol_indexing.jl:10.

The follow-up replaces those implicit facade uses with direct SciMLBase imports. It adds no dynamic allowlist and no blanket reexport.

Verification

$ GROUP=InterfaceI julia +release --startup-file=no --project=. -e 'using Pkg; Pkg.test("JumpProcesses"; coverage = false)'
Testing JumpProcesses tests passed
2087.65 seconds

$ GROUP=InterfaceII julia +release --startup-file=no --project=. -e 'using Pkg; Pkg.test("JumpProcesses"; coverage = false)'
Testing JumpProcesses tests passed
634.07 seconds

$ GROUP=QA julia +release --startup-file=no --project=. -e 'using Pkg; Pkg.test("JumpProcesses"; coverage = false)'
Test Summary: | Pass  Total   Time
QA Tests      |   17     17  34.1s
Testing JumpProcesses tests passed

$ typos --format brief <changed-files>
$ git diff --check

Runic was run over all changed Julia files. It reports existing whole-file formatting suggestions outside the 30 changed import lines; this focused behavior PR deliberately does not mix in a large formatting migration. The earlier docs build reached strict document checks and then failed only at external link checking because the ColPrac GitHub URL returned HTTP 429; no docs settings were weakened. Docs were not rerun for this import-only follow-up.

The PR branch and base were fetched before the normal fast-forward push. No rebase or force-push was used.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

CI isolates the dependency on the companion QA fix exactly as expected:

  • No unapproved public reexports: 1/1 pass
  • ExplicitImports: 4 pass / 2 errors, both solely the stale deleteat! import fixed by Use Base deleteat! directly #625
  • aggregate: 15 pass / 2 errors

Job: https://github.com/SciML/JumpProcesses.jl/actions/runs/31479151657/job/93742758524

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 14, 2026 14:10
@ChrisRackauckas
ChrisRackauckas merged commit fdfd104 into SciML:master Aug 14, 2026
12 checks passed
ChrisRackauckas added a commit that referenced this pull request Aug 23, 2026
* Restore the SciML common interface on `using JumpProcesses`

`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

* docs: document the reexported SciML common interface

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

---------

Co-authored-by: Claude <[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