You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change converts SparseArrays from a direct dependency to a weak
dependency loaded via an extension, reducing load time for users who
don't need sparse matrix functionality.
## Changes Made
1. **Project.toml**: Move SparseArrays from [deps] to [weakdeps] and add
NonlinearSolveSparseArraysExt extension
2. **src/NonlinearSolve.jl**: Remove direct SparseArrays import, now loaded
via extension when needed
3. **ext/NonlinearSolveSparseArraysExt.jl**: New extension module that loads
when SparseArrays is explicitly imported
## Benefits
- Removes direct SparseArrays dependency from NonlinearSolve.jl core
- Maintains all sparse matrix functionality when SparseArrays is loaded
- Follows Julia extension system best practices
- No breaking changes for existing users
- Architectural improvement for future optimizations
## Load Time Impact
While SparseArrays may still be loaded indirectly by other dependencies
(LinearSolve, FiniteDiff, etc.), this change removes NonlinearSolve's
direct contribution and provides benefits for users with minimal setups.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
0 commit comments