Package installation includes unnecessary docs files

I just installed Extremes.jl (Julia 1.13.0) and the size of ~/.julia/package/Extremes is 120Mio just because of the docs folder which contains big files (useless to me).

I don’t really plan to use this package but this is an example. What should I do to prevent this ? As a user that just installs packages but also as someone that owns this package

When you download a Julia package, you get everything the package’s authors have chosen to distribute with a given version, for better or worse.

Taking a peek at the package contents:

It’s just a big Jupyter notebook and its backup. I would file an issue or PR asking the maintainer to use nbconvert or similar to store that notebook as a plain Julia script.

Isn’t it standard to separate the functional package from the material associated with the publication? I think those can live in one monorepo, but I’m uncertain about whether that can save space by downloading only a package subfolder.

It’s basically a question of bad development practices, although it often takes a while for the developers to recognize it.

On the technical side of things, a Julia package contains exactly the files which are committed to the repository. However, it doesn’t have to be the entire repository but can be limited to any subdirectory. Once you have decided the subdirectory, it must contain the entire tree of files and directories below that one though.

For practical purposes this means that you can have multiple Julia packages in the same repository. It also means that you can have other material in your repository that doesn’t get included in the Julia package(s).

For various reasons it’s generally not a great idea to commit huge files to your repository anyway, in particular not generated files, but they don’t have to affect the Julia package.

One thing that can be done in the Julia registry tooling to dissuade from the inclusion of large files in packages is to block automatic merge to the General registry of packages larger than some threshold T. From a technical point of view this can be easily implemented. The more tricky question is to determine a good value of T.