build.zig.zon file .hash does not include executable bit in practice #16272
Labels
bug
Observed behavior contradicts documented or intended behavior
zig build system
std.Build, the build runner, `zig build` subcommand, package management
Milestone
Zig Version
0.11.0-dev.3890+43c98dc11
Steps to Reproduce and Observed Behavior
I was implementing a tool in Go to calculate/update build.zig.zon file hashes. While doing this, I noticed that the Zig implementation in
src/Package.zig
currently doesn't include executable file bit information in practice.If I download/extract this tarball using my system tar extractor, you can see we have at least two executable files in it:
However, if I modify this code in the stdlib to print the file hash and result of
isExecutable
:zig/src/Package.zig
Line 718 in 0a6cd25
Then we find
isExecutable
always returnsfalse
:This appears to be due to this TODO during tar extraction:
zig/src/Package.zig
Lines 603 to 611 in 0a6cd25
Importantly, this applies to all unix platforms too - not just windows - so once this is fixed, everyone's
build.zig.zon
file hashes will change.Expected Behavior
build.zig.zon hashes include executable bit information in them
The text was updated successfully, but these errors were encountered: