Skip to content

Improve explicit imports hygiene#55

Closed
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:explicit-imports-20260107-172515
Closed

Improve explicit imports hygiene#55
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:explicit-imports-20260107-172515

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Summary

This PR improves explicit imports hygiene for the package by:

  • Adding explicit imports for all symbols used from dependencies
  • Removing reliance on transitive dependencies
  • Adding ExplicitImports.jl tests to prevent regressions
  • Fixing test imports to be explicit about ReturnCode and SecondOrderODEProblem

Changes

Source Code (src/GeometricIntegratorsDiffEq.jl)

  • All symbols from GeometricIntegrators, SciMLBase, DiffEqBase, and Reexport are now explicitly imported
  • No more implicit imports or transitive dependencies
  • Module structure improved for better clarity

Tests

  • Added explicit imports for ReturnCode and SecondOrderODEProblem in test/runtests.jl
  • Created test/explicit_imports_test.jl with ExplicitImports.jl checks
  • Added ExplicitImports to test dependencies in Project.toml

Verification

Confirmed with ExplicitImports.jl that:

  • ✅ No implicit imports remain
  • ✅ No stale explicit imports
  • ✅ All existing tests pass
  • ✅ New ExplicitImports tests pass

This ensures the package follows best practices for dependency management and prevents issues with transitive dependencies.

cc @ChrisRackauckas

🤖 Generated with Claude Code

- Add explicit imports for all symbols used from dependencies
- Remove reliance on transitive dependencies
- Add ExplicitImports.jl tests to prevent regressions
- Fix test imports to be explicit about ReturnCode and SecondOrderODEProblem

All symbols from GeometricIntegrators, SciMLBase, DiffEqBase, and Reexport
are now explicitly imported. ExplicitImports.jl tests confirm no implicit
or stale imports remain.

Tests: All existing tests pass + new ExplicitImports tests added

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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