Allow storing download size in Artifacts.toml?

Currently, the “Artifacts.toml” file requires each download entry to contain a “sha256” and a “url”. Including the compressed size of the tarball could be useful.

Some of the benefits are.

  1. It would be easier to tell if a package will download large artifacts just by looking at its git repo.
  2. If a bad url tries to download a huge file when the expected tarball is small, this can be used to quickly abort the download, instead of needing to wait until the whole sha256 can be calculated.

I think a new “size” field would need to be optional to be a non-breaking change.

Is this something that the Pkg.jl maintainers would be interested in supporting?

2 Likes

Yeah, seems like a good idea. @staticfloat, what do you think? And what would we need to change?

Yeah, I think this was considered in the past, but just never got implemented. I have put up something that can be critiqued here: Artifacts: Add download size to `Artifacts.toml` by staticfloat · Pull Request #4171 · JuliaLang/Pkg.jl · GitHub

1 Like