PDMats.jl icon indicating copy to clipboard operation
PDMats.jl copied to clipboard

Make SparseArrays a weak dependency?

Open dkarrasch opened this issue 2 years ago • 3 comments

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.

dkarrasch avatar Jul 27 '23 11:07 dkarrasch

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.

devmotion avatar Jul 28 '23 00:07 devmotion

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

dkarrasch avatar Jul 28 '23 08:07 dkarrasch

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.

devmotion avatar Jul 31 '23 22:07 devmotion