Repository navigation
Upgrade to Zig 0.17.0 - #119
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (5)
📒 Files selected for processing (27)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe project now targets Zig 0.17.0 across its package requirements, development environments, CI, and documentation. Source and vendored YAML code use updated Zig APIs. Build orchestration uses a new host utility for package snapshots and release installation. ChangesZig 0.17.0 Upgrade
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Other Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk remains. The package-content guide can be corrected as a low-impact documentation follow-up. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 8 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The broad compiler and build-system migration warrants final human validation despite the comprehensive reported verification.
Review effort: Balanced
Findings: None
What changed in this PR
Upgrades the project and vendored zig-yaml code to Zig 0.17.0 while preserving generation behavior.
Changes:
- Migrates language and standard-library APIs to Zig 0.17.
- Replaces removed custom build steps with a host build-helper executable.
- Updates toolchain pins, documentation, generated fixtures, and deterministic allocation-failure testing.
| File | Description |
|---|---|
build.zig |
Migrates build, snapshot, installation, and runtime steps. |
build.zig.zon |
Raises Zig minimum and packages build tools. |
tools/build_tools.zig |
Adds snapshot and installation helper commands. |
Dockerfile.coverage |
Updates coverage compiler version. |
.mise.toml |
Updates local toolchain pin. |
.github/workflows/ci.yml |
Runs CI with Zig 0.17. |
.github/workflows/release.yml |
Builds releases with Zig 0.17. |
.github/copilot-instructions.md |
Updates development instructions. |
.devcontainer/devcontainer.json |
Updates container Zig feature. |
.devcontainer/README.md |
Updates container documentation. |
README.md |
Updates supported Zig version. |
docs/index.html |
Updates website version references. |
examples/PACKAGE.md |
Updates package documentation. |
examples/package_consumer/build.zig.zon |
Updates consumer minimum version. |
examples/compile_examples.zig |
Migrates declaration reflection. |
src/document_filter.zig |
Migrates struct reflection. |
src/input_loader.zig |
Migrates enum integer conversion. |
src/cli/file_names.zig |
Migrates list access API. |
src/generators/unified/model_generator/unions.zig |
Migrates ASCII search API. |
src/tests/test_utils.zig |
Adds deterministic no-resize allocator. |
src/tests/parameters_as_struct_tests.zig |
Uses the allocator in failure testing. |
vendor/zig-yaml/build.zig.zon |
Raises vendored package minimum version. |
vendor/zig-yaml/src/Yaml.zig |
Migrates reflection to struct-of-arrays metadata. |
vendor/zig-yaml/src/Tree.zig |
Migrates reflection and enum conversions. |
vendor/zig-yaml/src/Tokenizer.zig |
Migrates token-index conversions. |
vendor/zig-yaml/src/Parser.zig |
Migrates parser APIs and reflection. |
vendor/zig-yaml/src/Parser/test.zig |
Updates enum conversions in tests. |
generated/compile_generated.zig |
Migrates function parameter reflection. |
generated/main.zig |
Applies Zig 0.17 formatting conversion. |
generated/multi/main.zig |
Applies Zig 0.17 formatting conversion. |
generated/lmstudio-multi/main.zig |
Applies Zig 0.17 formatting conversion. |
generated/lmstudio_example.zig |
Applies Zig 0.17 formatting conversion. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #119 +/- ##
==========================================
- Coverage 97.06% 97.06% -0.01%
==========================================
Files 136 136
Lines 16941 16957 +16
==========================================
+ Hits 16444 16459 +15
- Misses 497 498 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Upgrades the project to Zig 0.17.0.
Build system
makeFn). The package snapshot (test-package) and theinstall-release*/install-debugsteps now run a small helper,tools/build_tools.zig, through a Run step.toolsis added to the packagepaths.b.args→run_cmd.addPassthruArgs();b.build_root→b.root;pathFromRoot→b.root.joinString.build.zignow callsb.graph.poisonCache()to keep the configure cache from serving stale values.std.builtin.OptimizeMode→std.lang.Optimize.b.install_prefixcan no longer be read at configure time, so theinstall-release*steps no longer honor--prefix. They install toINSTALL_DIR, then$HOME/.local/bin, then%USERPROFILE%\.local\bin.Language / std
@typeInfostruct and union info is now struct-of-arrays (field_names/field_types/field_attrs). Ported indocument_filter.zigand in vendored zig-yaml.ErrorBundle.Wip.initnow returns the value (zig-yaml);std.ascii.indexOfIgnoreCase→findIgnoreCase;Fn.params→param_types;std.meta.declarationsreturns names;getLast→last().?.zig fmtin 0.17 rewrites@intFromEnum→@backingInt. Applied so CI'szig fmt --checkpasses. The generator never emits@intFromEnum, so generated clients are unaffected.std.testing.allocatoris nowSafeAllocator. Whether it can resize in place varies between runs, which made onecheckAllAllocationFailurestest fail withNondeterministicMemoryUsage. That test now goes through a no-resize wrapper allocator.Toolchain pins and docs
minimum_zig_version(root, package_consumer, vendored zig-yaml), CI, release, mise, devcontainer, coverage Dockerfile, README, PACKAGE.md, copilot-instructions (and its download URL, which used the oldzig-linux-x86_64naming), and the website.Verification (Windows, Zig 0.17.0)
zig build test: 11/11 steps, 586/592 tests passed (6 skipped). This includes the generated-code compile tests and thetest-packageconsumer build.zig build build-all: all 5 cross targets build.zig build run-generate: generated output is byte-identical, andgenerated/main.zigandlmstudio_example.zigcompile.examples/compile_examples.zigpasses.zig build run -- --version(passthru args) andinstall-debugwithINSTALL_DIRboth work.zig fmt --check .is clean on an LF checkout.Not done (follow-ups)
std.heap.DebugAllocator(about 570 test call sites) andstd.fmt.allocPrintare deprecated in 0.17 but still work, so they are left for a separate cleanup.unable to load "<std file>.zig": Unexpectedunder high build parallelism. This is a compiler/OS issue, not something in this repo. Rerunning or passing-j2avoids it.Summary by CodeRabbit
INSTALL_DIRor the user’s home directory.