-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
Artifacts: Add download size to Artifacts.toml
#4171
base: master
Are you sure you want to change the base?
Conversation
I made JuliaPackaging/ArtifactUtils.jl#25 to try this out. |
How common is this? Is there any concrete case of this happening right now? |
Very important bikeshedding question: should the "size" field be in hex or base 10? For example: |
We don't put anything else in hex, I think we should just stick with the most human-readable format. |
"sha256" => bytes2hex(adi.hash), | ||
) | ||
if adi.size > 0 | ||
ret["size"] = adi.size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ret["size"] = adi.size | |
ret["size"] = Int64(adi.size) |
Converting UInt64
to Int64
here prevents TOML.jl from writing the number in hex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Darn, I was hoping it would just call string(x)
, but I guess not. I'll just make everything an Int64
then.
4f582d1
to
947190c
Compare
This shows one possible way of adding an optional download size value to an artifact binding. While this value is not used anywhere yet, it could be used to create warnings when downloading large artifacts, or to feed progress meters when the server does not provide content size headers.
947190c
to
355ddef
Compare
This shows one possible way of adding an optional download size value to an artifact binding. While this value is not used anywhere yet, it could be used to create warnings when downloading large artifacts, or to feed progress meters when the server does not provide content size headers.