Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce dependencies? #75

Closed
devmotion opened this issue Jun 16, 2021 · 5 comments
Closed

Reduce dependencies? #75

devmotion opened this issue Jun 16, 2021 · 5 comments

Comments

@devmotion
Copy link

IMO it would be good to use InfiniteArrays in Distributions to represent support of e.g. Poisson distributions since currently it just throws an error (JuliaStats/Distributions.jl#1254). However, it seems that InfiniteArrays pulls in quite many dependencies such as FFTW, MacroTools, MatrixFactorizations, OffsetArrays, FFTW_jll, and MKL_jll. Would it be possible to reduce the dependencies of InfiniteArrays and maybe separate the core and advanced functionality?

Or maybe it is better to implement a custom type for infinite ranges in Distributions? Or maybe there are some other more lightweight alternatives?

@dlfivefifty
Copy link
Member

I think it’s mostly from DSP.jl which we only use to overload conv. So this could work if we move that elsewhere

@dlfivefifty
Copy link
Member

OK I've removed the DSP.jl dependency and now I get

(InfiniteArrays) pkg> up
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
    Updating `~/Projects/InfiniteArrays.jl/Project.toml`
  [4c555306] + ArrayLayouts v0.7.0
  [1a297f60] + FillArrays v0.11.7
  [e1ba4f0e] + Infinities v0.1.0
  [5078a376] + LazyArrays v0.21.6
    Updating `~/Projects/InfiniteArrays.jl/Manifest.toml`
  [4c555306] + ArrayLayouts v0.7.0
  [1a297f60] + FillArrays v0.11.7
  [e1ba4f0e] + Infinities v0.1.0
  [5078a376] + LazyArrays v0.21.6
  [1914dd2f] + MacroTools v0.5.6
  [a3b82374] + MatrixFactorizations v0.8.3
  [90137ffa] + StaticArrays v1.2.2
  [2a0f44e3] + Base64
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [d6f4376e] + Markdown
  [de0858da] + Printf
  [9a3f8284] + Random
  [9e88b42a] + Serialization
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [4ec0a83e] + Unicode

Is this better?

@devmotion
Copy link
Author

Yes, this is a lot better! I just checked and basically all additional indirect dependencies such as MacroTools or StaticArrays are caused by LazyArrays, and so I assume it can't be reduced any further?

@dlfivefifty
Copy link
Member

The use of MacroTools.jl in LazyArrays.jl can (and should) be moved out. It’s for a macro @~ that’s more user facing so is not used here.

That said I don’t have the energy to do that right now

@dlfivefifty
Copy link
Member

I think it’s possible to make a simpler package InfiniteRanges.jl as the infinite range functionality does not actually depend on LazyArrays.jl

again I don’t have time to do that but would be supportive if you wished to take the lead

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

No branches or pull requests

2 participants