Skip to content

zig build dependencies: name the hash function used in the manifest #14284

Closed
@andrewrk

Description

@andrewrk

Extracted from #14265.

Currently the build.zig.ini file uses:

hash=c9b30cffc40999d2c078ff350cbcee642970a224fe123c756d0892f876cf1aae

This is a SHA-256 hex-encoded digest. This proposal is to change it to:

hash.digest=c9b30cffc40999d2c078ff350cbcee642970a224fe123c756d0892f876cf1aae
hash.function=sha256

Or perhaps:

hash=sha256=c9b30cffc40999d2c078ff350cbcee642970a224fe123c756d0892f876cf1aae

Idea being to leave room for an upgrade to a different hash function in the future.

The second form may be preferred in order to ease copy+pasting from an error message, and so that diffs of hashes are only one line each.

Another possible syntax would be to use _ instead of = which would allow hashes to be used as field names in #14290 without use of @"" syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingImplementing this issue could cause existing code to no longer compile or have different behavior.enhancementSolving this issue will likely involve adding new logic or components to the codebase.zig build systemstd.Build, the build runner, `zig build` subcommand, package management

    Type

    No type

    Projects

    Status

    Urgent Enhancements

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions