Skip to content

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

Closed
@andrewrk

Description

@andrewrk

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThis proposal is planned.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.zig build systemstd.Build, the build runner, `zig build` subcommand, package management

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions