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

fix build for latest zig #66

Merged
merged 1 commit into from
Mar 2, 2025
Merged

Conversation

vrischmann
Copy link
Contributor

Hello,

There were breaking changes in build.zig.zon with zig master a couple of days:

  • the name must be a enum literal. Since zig-args is an invalid enum literal, I changed it to name as recommended in the documentation.
  • the fingerprint is a new mandatory field, zig build generates one if it's not present in the file.

Changing the name is obviously a breaking change, users will have to change their build.zig file to use args instead of zig-args; I can change the name to whatever you want if you decide to go ahead with this PR.

@bobf
Copy link
Contributor

bobf commented Mar 2, 2025

@vrischmann Sorry, I made a fork so I could use as a temporary dependency in my project and then made the PR without checking here first.

In my PR I use the name zig_args instead of args - I prefer yours but I guess @ikskuh can choose.

@ikskuh ikskuh merged commit 9425b94 into ikskuh:master Mar 2, 2025
3 checks passed
@ikskuh
Copy link
Owner

ikskuh commented Mar 2, 2025

Thanks!

Changing the name is obviously a breaking change, users will have to change their build.zig file to use args instead of zig-args; I can change the name to whatever you want if you decide to go ahead with this PR.

No, they don't. The .name field isn't relevant for consuming the package. You can name it in the build.zig.zon however you want, so you only have to update the hash

@vrischmann
Copy link
Contributor Author

Thanks!

Changing the name is obviously a breaking change, users will have to change their build.zig file to use args instead of zig-args; I can change the name to whatever you want if you decide to go ahead with this PR.

No, they don't. The .name field isn't relevant for consuming the package. You can name it in the build.zig.zon however you want, so you only have to update the hash

You're right, I wasn't clear enough.
What I meant was that if now I rerun "zig fetch" for zig-args the name saved in build.zig.zon will change, and users will have to change their build.zig to use the new name.
But yeah it's not a big deal.

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.

3 participants