-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
legacy packages are unnecessarily fetched #23051
Comments
One instance where this is problematic is integrating with C libraries that have no knowledge of the Zig build system and completely lack a As a result of this issue a repeated I do not wish to go back to git submodules or vendoring for this use case :^) |
It appears C projects without build.zig.zon can still be given an updated hash following the new format (and thus no longer being a legacy package), just run
Since the C dependencies have no build.zig.zon at all, they don't need to be updated to fit the new format, just the dependent needs to update the hash. The repositories in All Your Codebase would have to update all of their hashes as well in order to support the new format. |
oh, there's a solution hiding in plain sight - thanks for pointing that out! I was convinced I updated all of my deps with new hashes, looks like I missed one 😅 |
the old package hash format has a known bug, that causes unnecessary fetching: ziglang/zig#23051 this is avoided by using the new hash format
Zig Version
0.14.0-dev.3451+d8d2aa9af
Steps to Reproduce and Observed Behavior
zig build
in a project that uses legacy hash format (e.g.1220e97357cc39f4f9f053c763f3ec1623e0c7f3999f185746f2bd9bf9b5c5551392
)N-V-__8AAJCtGQSh2-Qbxpqs91AmpxWIEhmOomX7nKxk3Lkc
instead (new hash format)zig build --system ~/.cache/zig/p
Expected Behavior
Expected cache hit, no network usage.
Suggested workaround: upgrade to new hash format
Alternate workaround: use zig-0.13.0 to
zig fetch
legacy packagesI have no plans to solve this bug. Problem will solve itself as projects upgrade to new hash format.
The text was updated successfully, but these errors were encountered: