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

update zig package hashes to include the uncompressed total file size on disk #16528

Open
andrewrk opened this issue Jul 24, 2023 · 0 comments
Open
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. zig build system std.Build, the build runner, `zig build` subcommand, package management
Milestone

Comments

@andrewrk
Copy link
Member

Zig package manager hashes currently use multihash to encode metadata into the hash bytes. For example, which hash algorithm is used. Additionally, we can encode more information, such as the uncompressed total file size of the package, without breaking prior hashes, thanks to this encoding.

This would allow for better progress reporting when running zig build and packages are being fetched, even when the server responds with content-encoding: chunked. This would require some fun bookkeeping, such as streaming the http response through the decompressor through tarball unpacking, through the filtering process (#14311), and then counting how many bytes are actually written to disk.

It would work, though!

@andrewrk andrewrk added proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. zig build system std.Build, the build runner, `zig build` subcommand, package management labels Jul 24, 2023
@andrewrk andrewrk added this to the 0.12.0 milestone Jul 24, 2023
@andrewrk andrewrk modified the milestones: 0.13.0, 0.12.0 Aug 5, 2023
@andrewrk andrewrk modified the milestones: 0.12.0, 0.13.0 Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. zig build system std.Build, the build runner, `zig build` subcommand, package management
Projects
None yet
Development

No branches or pull requests

1 participant