Skip to content

build: support zig 0.16#12

Merged
lalinsky merged 1 commit intolalinsky:mainfrom
banteg:zig-0.16
Apr 30, 2026
Merged

build: support zig 0.16#12
lalinsky merged 1 commit intolalinsky:mainfrom
banteg:zig-0.16

Conversation

@banteg
Copy link
Copy Markdown
Contributor

@banteg banteg commented Apr 30, 2026

Summary

  • require Zig 0.16.0 in build.zig.zon
  • mark the struct field slice as comptime for the inline for helper
  • remove an unused tagged-union payload capture rejected by Zig 0.16

Tests

  • ./check.sh --ci

Summary by CodeRabbit

  • Chores

    • Updated minimum Zig toolchain requirement to version 0.16.0.
  • Refactor

    • Internal code improvements and optimizations.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4440eebf-4579-4012-93b4-b58822a5ed8d

📥 Commits

Reviewing files that changed from the base of the PR and between ca0f153 and 7cd4568.

📒 Files selected for processing (3)
  • build.zig.zon
  • src/struct.zig
  • src/union.zig

📝 Walkthrough

Walkthrough

This pull request bumps the Zig toolchain requirement from 0.15.1 to 0.16.0 in the build manifest. It also adds a comptime qualifier to the fields parameter in countUsedStructFields and removes an unused variable binding in the union field unpacking switch statement.

Changes

Cohort / File(s) Summary
Toolchain Version Update
build.zig.zon
Incremented minimum_zig_version from "0.15.1" to "0.16.0" to reflect updated toolchain requirement.
Struct Field Counting
src/struct.zig
Added comptime qualifier to the fields parameter of countUsedStructFields, requiring struct field metadata to be known at compile-time.
Union Field Unpacking
src/union.zig
Removed unused bound variable from switch-arm pattern in unpackUnionAsTagged for the .field_name_prefix case, changing |_| to no binding.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hopping through our Zig-zag code so neat,
We've bumped the version—quite a treat!
With comptime fields and bindings cleared away,
Our structs and unions dance and play! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'build: support zig 0.16' accurately reflects the main objective: updating the project to support Zig 0.16 by bumping the minimum version requirement and making necessary code adjustments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@lalinsky lalinsky merged commit b4460b5 into lalinsky:main Apr 30, 2026
2 of 3 checks passed
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