Skip to content

Dependencies within dependencies return incorrect hashes. #18903

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

Closed
James-Riordan opened this issue Feb 12, 2024 · 3 comments
Closed

Dependencies within dependencies return incorrect hashes. #18903

James-Riordan opened this issue Feb 12, 2024 · 3 comments
Labels
question No questions on the issue tracker, please.

Comments

@James-Riordan
Copy link

Zig Version

0.11.0

Steps to Reproduce and Observed Behavior

I'm on Mac Sonoma 14.3.

As mentioned in issue #17282, sub-dependencies are returning incorrect hashes.

build.zig.zon:

.{ .name = "test-exe", .version = "0.1.0", .dependencies = .{ .mach_glfw = .{ .url = "https://pkg.machengine.org/mach-glfw/63da35e57c3695a787b927e69e4140eb74ffc234.tar.gz", .hash = "1220806227b5df5d8a1dadbe40aec02fc277f11fe0d075c065ce3c80b9d55ccaa89e", }, } }

Run zig build:

Fetch Packages [2/2] mach_glfw.glfw... /Users/jamesriordan/.cache/zig/p/1220806227b5df5d8a1dadbe40aec02fc277f11fe0d075c065ce3c80b9d55ccaa89e/build.zig.zon:16:21: error: hash mismatch: expected: 122091debcee20ff2aaf983a9e8c215d4e50cc6caf44975442218901ea728e7dd79a, found: 122089efe880448a38419eeaff375bf22b420d56665e06cc249e9239737b4f2fc06d .hash = "122091debcee20ff2aaf983a9e8c215d4e50cc6caf44975442218901ea728e7dd79a",

Expected Behavior

I expect zig build to work properly when installing a library/codebase into my module. The sub-dependency's hashes are incorrect. I haven't been able to solve on my own.

@James-Riordan James-Riordan added the bug Observed behavior contradicts documented or intended behavior label Feb 12, 2024
@xdBronch
Copy link
Contributor

i believe there is a difference in how hashes are calculated between 0.11 and now. also that mach-glfw commit is for a much more recent version of zig so i dont think it would work for you even if the hashes matched

@James-Riordan
Copy link
Author

i believe there is a difference in how hashes are calculated between 0.11 and now. also that mach-glfw commit is for a much more recent version of zig so i dont think it would work for you even if the hashes matched

This makes sense. How can I upgrade my Zig from the tar.xz download? I used brew the first time around but brew only offers Zig version 0.11.0, and I'm not so sure how I'm supposed to configure the manual download of zig-macos-x86_64-0.12.0-dev.2710+c3eb592a3 from its tar.xz.

Any suggestions?

@xdBronch
Copy link
Contributor

if youre interested in using mach you should use their nominated zig version instead of the latest master version. https://machengine.org/about/nominated-zig/#202401 download links are at the bottom of this.

@jacobly0 jacobly0 added question No questions on the issue tracker, please. and removed bug Observed behavior contradicts documented or intended behavior labels Feb 12, 2024
@jacobly0 jacobly0 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question No questions on the issue tracker, please.
Projects
None yet
Development

No branches or pull requests

3 participants