Skip to content
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

Add build.zig to paths in build.zig.zon #29

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

ianprime0509
Copy link
Contributor

@ianprime0509 ianprime0509 commented Dec 15, 2023

Initially reported here: ziglang/zig#18282

If build.zig is not included in paths in build.zig.zon, the resulting package will not have that file included, leading to the package not being usable as intended, as seen through zig fetch --debug-hash:

$ zig fetch --debug-hash https://github.com/sam701/zig-cli/archive/e32f7454d690761ec2b4eab8600e0610d0d233bd.tar.gz
file: 54b645cc4a56212c6b1f97187aa6a129fd2eaebb9d8bea7cef04eb018eb7e208: build.zig.zon
file: fa9b337869d6c96162c0b84bd6889b38f445cffee40b6a9a8ffe0c06dd047d45: src/Printer.zig
file: c21c93b35cbd4fe8f7c59414652fb81f4cc06f7e0e0733b84f187c77a8443ca0: src/arg.zig
file: 1658e9acfe148c710d2754e42ab3e8a61d262bd46b8ba51510cda3ae3c0b98b6: src/command.zig
file: abce9fc3079e47c86ef9e1b0628b7ceca170b838c60857b98aa45c92844a706a: src/help.zig
file: 44478322ab927d0a57d8c2f442b76dca6b86e817c117d89ee3cfea6479ac4a17: src/main.zig
file: af69f2c9bd7f83454ff2368e986ccd4bc176f12628c3f10ce1e3fc927b1867c1: src/parser.zig
file: 9160cfb9b9d3ee6454dbfe34662a6ae471aae02b6ad1401ed48e40165b5a7c39: src/tests.zig
file: f0b90aebf22be930287b872faebf948494c34c7f1cb5bfcf51b962a9143a04c3: src/value_parser.zig
file: b6972db0a57450f4b70e4eeaa375ef683c6272b268bd8740b61062d40038eefe: src/value_ref.zig
12205d064a9bd4dac1ebce2cead5bc686ee85eb703b994495efd3b65115666555cd7

To fix this, I added build.zig to the paths field, and also updated the standalone example to point to this new version (which runs successfully for me on 0.12.0-dev.1828+225fe6ddb).

If this PR is merged using a merge commit, the update to the example's build.zig.zon should still be valid; otherwise (if any changes are made, e.g. using a squash commit or rebase), it will have to be updated again to reflect the final commit hash.

Without this, the package manager will not include build.zig in the
fetched package, leading to the resulting package being unusable.

See ziglang/zig#18282
@sam701 sam701 merged commit 641e900 into sam701:main Dec 15, 2023
1 of 2 checks passed
@sam701
Copy link
Owner

sam701 commented Dec 15, 2023

@ianprime0509 thank you for your contribution 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants