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

Enforce Zig version for build.zig #605

Closed
wants to merge 2 commits into from

Conversation

Rexicon226
Copy link
Contributor

@Rexicon226 Rexicon226 commented Jan 8, 2024

this is how you do it :)

I'm very happy to see you guys using zig 👍

We had a massive build system overhaul a couple of days ago (ziglang/zig#18160) and if you'd like, I could port you guys over. You'll need to do it at some point if you wish to complete the todo:

update to zig v0.12 final (when released)

@ivmai
Copy link
Owner

ivmai commented Jan 9, 2024

Thank you!
I think we need to replace == with >= for the required version comparison.

@ivmai
Copy link
Owner

ivmai commented Jan 9, 2024

We had a massive build system overhaul a couple of days ago (ziglang/zig#18160) and if you'd like, I could port you guys over.

Sure!

@Rexicon226
Copy link
Contributor Author

Thank you! I think we need to replace == with >= for the required version comparison.

Sure. I just read the comment as "assuming" a specific version, and made it eq. Most people now do use gt 👍

@ivmai
Copy link
Owner

ivmai commented Jan 9, 2024

if (builtin.zig_version.order(required_zig) != .eq)
->
if (builtin.zig_version.order(required_zig) == .lt)

Right? I'll fix it

@Rexicon226
Copy link
Contributor Author

Rexicon226 commented Jan 9, 2024

if (builtin.zig_version.order(required_zig) != .eq) -> if (builtin.zig_version.order(required_zig) == .lt)

Right? I'll fix it

Yep, but don't worry. I included it in the update to zig master 👍 (technically not master anymore, but it was a day ago 😄 , it's after the large overhaul is what matters)

ivmai pushed a commit that referenced this pull request Jan 9, 2024
PR #605 (bdwgc).

* build.zig (zig_min_required_version): Define const; update TODO item
about zig version.
* build.zig (comptime): Produce a compile error if zig version is less
than zig_min_required_version.
@ivmai
Copy link
Owner

ivmai commented Jan 9, 2024

Merged all commits with some modifications - c535d0f, 9566d70, 98e4d0a

@ivmai ivmai closed this Jan 9, 2024
@Rexicon226 Rexicon226 deleted the complete-todo branch February 3, 2024 21:23
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