ci: bump Zig to 0.14.1 so CI can build (.root_module is a 0.14 API)#1
Open
abhicris wants to merge 1 commit intocryptuon:mainfrom
Open
ci: bump Zig to 0.14.1 so CI can build (.root_module is a 0.14 API)#1abhicris wants to merge 1 commit intocryptuon:mainfrom
abhicris wants to merge 1 commit intocryptuon:mainfrom
Conversation
Every CI run has failed since 2026-04-07 with the same error on all
six matrix cells:
build.zig:9:10: error: no field named 'root_module' in struct
'Build.ExecutableOptions'
`build.zig` uses the 0.14 build-system API throughout — `b.addExecutable(.{
.root_module = b.createModule(...) })`, `b.addLibrary`, `b.addTest(.{
.root_module = ... })` — but `.github/workflows/ci.yml` pins the toolchain
to 0.13.0, which doesn't know about the `root_module` field.
Bumping `ZIG_VERSION` from "0.13.0" to "0.14.1" (latest 0.14 patch) lets
the existing build.zig compile without touching any source. No other
edits required.
— [kcolbchain](https://kcolbchain.com) / [Abhishek Krishna](https://abhishekkrishna.com)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Every CI run since 2026-04-07 has failed on every matrix cell (test × 3 OSes, build × 3 OSes × 3 optimize modes = 12 jobs) with the exact same error:
Sample from the most recent run (
24318456000):Test (ubuntu-latest)—build.zig:9:10: error: no field named 'root_module' in struct 'Build.ExecutableOptions'→ exit 2Test (macos-latest)— same errorTest (windows-latest)— same errorBuild (ubuntu-latest, ReleaseFast/ReleaseSmall/Debug)— same errorBuild (macos-latest, *)/Build (windows-latest, *)— same errorRoot cause
build.ziguses the 0.14 build-system API throughout:b.addExecutable(.{ .root_module = b.createModule(...) })b.addLibrary(.{ .linkage = ..., .root_module = ... })b.addTest(.{ .root_module = b.createModule(...) })All three of these APIs were introduced in Zig 0.14.0. The
.root_modulefield was added toBuild.ExecutableOptions/Build.LibraryOptions/Build.TestOptionsas part of the 0.14.0 build-system unification (replacing the oldroot_source_file/addSharedLibrary/addStaticLibraryfamily)..github/workflows/ci.ymlpinsZIG_VERSION: "0.13.0", which doesn't know aboutroot_module. The toolchain rejectsbuild.zigon line 9 before anything can build.Fix
One-line change: bump
ZIG_VERSIONin.github/workflows/ci.ymlfrom"0.13.0"→"0.14.1"(latest 0.14.x patch, final 0.14 release). Added a comment above the pin explaining why 0.14 specifically so future bumps don't accidentally regress to 0.13.No source files touched.
build.zigalready targets 0.14; this PR just makes the CI toolchain match.Why not bump to 0.15?
addModulereplacing somecreateModulepatterns). Bumping past the matching major would require editingbuild.zigto match. Keeping the bump to 0.14.1 minimizes the blast radius — the same APIbuild.zigalready targets.build.zigmigration bundled together.Verification
Cannot verify locally (no 0.14.1 toolchain on this box), but the fix is mechanical:
build.ziguses 0.14 API, so the toolchain has to be 0.14.x. This PR's own CI run will demonstrate — once GitHub picks it up, all 12 matrix cells that were failing on 0.13 should now proceed pastbuild.zigparsing.— kcolbchain / Abhishek Krishna