Skip to content

Improve explicit imports hygiene#53

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:explicit-imports-20260107-145347
Jan 8, 2026
Merged

Improve explicit imports hygiene#53
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:explicit-imports-20260107-145347

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Summary

This PR improves explicit imports hygiene for the GeometricIntegratorsDiffEq.jl package using ExplicitImports.jl.

Changes made:

  1. Made all imports explicit in src/GeometricIntegratorsDiffEq.jl:

    • Explicitly imported Reexport and @reexport from Reexport.jl
    • Made DiffEqBase import explicit in the @reexport statement
    • Explicitly imported functions from SciMLBase: ReturnCode, check_keywords, isinplace, warn_compat
    • Explicitly imported all needed integrator types and functions from GeometricIntegrators: CrankNicolson, Crouzeix, ExplicitEuler, ExplicitMidpoint, Gauss, Heun2, Heun3, ImplicitEuler, ImplicitMidpoint, KraaijevangerSpijker, Kutta3, LobattoIIIA, LobattoIIIAIIIB, LobattoIIIB, LobattoIIIBIIIA, LobattoIIIC, LobattoIIID, LobattoIIIE, LobattoIIIF, Newton, QinZhang, RK4, RK416, RK438, RadauIA, RadauIIA, Ralston2, Ralston3, Runge2, SRK3, SSPRK3, SymplecticEulerA, SymplecticEulerB, integrate
  2. Fixed test file imports in test/runtests.jl:

    • Added explicit imports for solve, ReturnCode, and SecondOrderODEProblem from DiffEqBase
  3. Added ExplicitImports.jl tests to prevent regression:

    • Created test/explicit_imports_test.jl with tests for implicit and stale imports
    • Added ExplicitImports to test dependencies in Project.toml
    • Added ExplicitImports test group to test/runtests.jl

Benefits:

  • No reliance on transitive dependencies: All imports are now explicit, reducing risk of breakage from upstream changes
  • Better code clarity: It's immediately clear which functions come from which packages
  • Automated testing: ExplicitImports tests will catch any future implicit imports before they reach CI

Testing:

All tests pass, including:

  • ✅ Standard ODE Problems tests (32 tests)
  • ✅ ExplicitImports tests (2 tests)
  • ✅ Allocation tests (9 tests)
  • ✅ JET static analysis tests (29 tests)

cc @ChrisRackauckas

🤖 Generated with Claude Code

- Made all imports explicit using ExplicitImports.jl
- Added explicit imports for DiffEqBase, SciMLBase, GeometricIntegrators
- Added ExplicitImports.jl tests to prevent regression
- Fixed test file imports to work with explicit imports

All imports are now explicit, reducing risk of issues from transitive dependencies.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@ChrisRackauckas ChrisRackauckas merged commit 2639c6b into SciML:master Jan 8, 2026
4 of 6 checks passed
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.

3 participants