Skip to content

Commit 42d183e

Browse files
committed
Remove SparseMatrixColorings as a dependency
SparseMatrixColorings was only imported in NonlinearSolve.jl but never actually used. The actual implementation is in NonlinearSolveBase where it's already a weakdep with an extension. Changes: - Removed the `using SparseMatrixColorings` import from src/NonlinearSolve.jl - Removed SparseMatrixColorings from deps and weakdeps - Kept it in test extras since it's needed for testing automatic sparse differentiation This reduces the dependency load for all users. Those who need sparse AD support will get it through NonlinearSolveBase's extension when they load SparseMatrixColorings. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent b37b31b commit 42d183e

File tree

2 files changed

+10
-24
lines changed

2 files changed

+10
-24
lines changed

Project.toml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Preferences = "21216c6a-2e73-6563-6e65-726566657250"
2626
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
2727
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
2828
SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7"
29-
SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35"
3029
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
3130
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
3231

@@ -45,6 +44,14 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
4544
SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412"
4645
Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4"
4746

47+
[sources]
48+
BracketingNonlinearSolve = {path = "lib/BracketingNonlinearSolve"}
49+
NonlinearSolveBase = {path = "lib/NonlinearSolveBase"}
50+
NonlinearSolveFirstOrder = {path = "lib/NonlinearSolveFirstOrder"}
51+
NonlinearSolveQuasiNewton = {path = "lib/NonlinearSolveQuasiNewton"}
52+
NonlinearSolveSpectralMethods = {path = "lib/NonlinearSolveSpectralMethods"}
53+
SimpleNonlinearSolve = {path = "lib/SimpleNonlinearSolve"}
54+
4855
[extensions]
4956
NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt"
5057
NonlinearSolveFixedPointAccelerationExt = "FixedPointAcceleration"
@@ -142,31 +149,13 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
142149
ReTestItems = "817f1d60-ba6b-4fd5-9520-3cf149f6a823"
143150
SIAMFANLEquations = "084e46ad-d928-497d-ad5e-07fa361a48c4"
144151
SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5"
152+
SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35"
145153
SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412"
146154
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
147155
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
148156
Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4"
149157
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
150158
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
151159

152-
[sources.BracketingNonlinearSolve]
153-
path = "lib/BracketingNonlinearSolve"
154-
155-
[sources.NonlinearSolveBase]
156-
path = "lib/NonlinearSolveBase"
157-
158-
[sources.NonlinearSolveFirstOrder]
159-
path = "lib/NonlinearSolveFirstOrder"
160-
161-
[sources.NonlinearSolveQuasiNewton]
162-
path = "lib/NonlinearSolveQuasiNewton"
163-
164-
[sources.NonlinearSolveSpectralMethods]
165-
path = "lib/NonlinearSolveSpectralMethods"
166-
167-
[sources.SimpleNonlinearSolve]
168-
path = "lib/SimpleNonlinearSolve"
169-
170160
[targets]
171-
test = ["Aqua", "BandedMatrices", "BenchmarkTools", "CUDA", "ExplicitImports", "FastLevenbergMarquardt", "FixedPointAcceleration", "Hwloc", "InteractiveUtils", "LeastSquaresOptim", "LineSearches", "MINPACK", "NLSolvers", "NLsolve", "NaNMath", "NonlinearProblemLibrary", "OrdinaryDiffEqTsit5", "PETSc", "Pkg", "PolyesterForwardDiff", "Random", "ReTestItems", "SIAMFANLEquations", "SparseConnectivityTracer", "SpeedMapping", "StableRNGs", "StaticArrays", "Sundials", "Test", "Zygote"]
172-
161+
test = ["Aqua", "BandedMatrices", "BenchmarkTools", "CUDA", "ExplicitImports", "FastLevenbergMarquardt", "FixedPointAcceleration", "Hwloc", "InteractiveUtils", "LeastSquaresOptim", "LineSearches", "MINPACK", "NLSolvers", "NLsolve", "NaNMath", "NonlinearProblemLibrary", "OrdinaryDiffEqTsit5", "PETSc", "Pkg", "PolyesterForwardDiff", "Random", "ReTestItems", "SIAMFANLEquations", "SparseConnectivityTracer", "SparseMatrixColorings", "SpeedMapping", "StableRNGs", "StaticArrays", "Sundials", "Test", "Zygote"]

src/NonlinearSolve.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ using SimpleNonlinearSolve: SimpleBroyden, SimpleKlement
3030
using FiniteDiff: FiniteDiff # Default Finite Difference Method
3131
using ForwardDiff: ForwardDiff, Dual # Default Forward Mode AD
3232

33-
# Sparse AD Support: Implemented via extensions in NonlinearSolveBase
34-
using SparseMatrixColorings: SparseMatrixColorings
35-
3633
# Sub-Packages that are re-exported by NonlinearSolve
3734
using BracketingNonlinearSolve: BracketingNonlinearSolve
3835
using LineSearch: LineSearch

0 commit comments

Comments
 (0)