JuliaStats / PDMats.jl

Uniform Interface for positive definite matrices of various structures
Other
104 stars 43 forks source link

Make SparseArrays a weak dependency? #174

Open dkarrasch opened 1 year ago

dkarrasch commented 1 year ago

From a very quick glance, it seems that a good portion of this package extends SparseArrays via PDSparseMat and related methods for it, but I wonder if, after splitting this from the main package, any dependency on SparseArrays.jl remains? If not, it would be very worthwhile to handle SparseArrays via the Pkg extension mechanism, to avoid the increased load time in Julia v1.10 due to SparseArrays.jl.

devmotion commented 1 year ago

We would have to define PDSparseMat in the main package without restricting the type parameter to be able to export it - which is definitely possible but indicates that this implementation would not be the prototypical example of a package extension.

In general, it seems there are major issues with PDSparseMat though (https://github.com/JuliaStats/PDMats.jl/issues/120), so maybe it should not be offered by PDMats anyway or be improved significantly.

dkarrasch commented 1 year ago

Great, seems like two good reasons to make a breaking change: remove PDSparseMat and for whatever remains make SparseArrays.jl a weak dependency? 😛

devmotion commented 1 year ago

https://github.com/JuliaStats/PDMats.jl/pull/175 should fix these major issues with PDSparseMat, so it seems with this PR there's not a strong argument anymore for removing PDSparseMat.