Skip to content

build: migrate Architect to Zig 0.16.0 - #376

Merged
forketyfork merged 14 commits into
mainfrom
feat/zig-0-16
Sep 1, 2026
Merged

build: migrate Architect to Zig 0.16.0#376
forketyfork merged 14 commits into
mainfrom
feat/zig-0-16

Conversation

@forketyfork

@forketyfork forketyfork commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Issue

Architect must move from Zig 0.15.2 to Zig 0.16.0, including the dependency pins and build-script APIs that gate the migration.

Solution

This PR spans Tasks 6-15 of the Zig 0.16.0 migration plan. Task 6 flips the flake toolchain pin and minimum Zig version, updates the four verified dependency hashes, renames the build graph environment map, and migrates build.zig SDK probing to std.Io and std.process.run.

Context

CI is EXPECTED TO FAIL from this commit through Task 12, by design, because the codebase cannot build on both toolchains simultaneously mid-flip. The true green gate is Task 13. The remaining commits on this branch will complete Tasks 7-15 before this PR is merged.

Test plan

  • PASS: direct Zig 0.16.0 zig build --help
  • PASS: build script format check with Zig 0.16.0
  • EXPECTED FAIL: direct Zig 0.16.0 zig build baseline, with 6 source error diagnostics captured in .tmp/flip-errors.txt
  • PASS: dependency resolution reached Architect source without ghostty, libxev, toml, or zwanzig dependency diagnostics
  • DO NOT expect CI to be green until Task 13; do not poll CI for green at this intermediate task

ghostty moves to a main-branch commit because 1.3.2-dev is the first line
requiring 0.16.0 and no v1.3.2 tag exists yet; libxev follows ghostty's pin;
zig-toml moves to its zig-0.16 branch. zwanzig v0.15.1 already supports
0.16.0 through its compat layer and needs no version change.

src/ does not compile yet; the following commits on this branch complete
the migration.
env, clock, and proc now take the io context that Zig 0.16 requires.
Keep the Darwin-only workaround because Task 1 could not verify arm64e SDK linking from the Linux sandbox.
Manual app verification is unavailable in the Linux sandbox without a display or macOS SDK environment.
Refresh the pinned zig-overlay revision (flake.lock) so Zig 0.16.0 is
resolvable at all. Rewrite macos_input_source.zig's Carbon/CoreFoundation/
objc bindings as hand-written externs instead of @cImport, since Zig 0.16's
Aro-based translate-c can't resolve nested framework headers or parse
ImageIO's Blocks syntax that Carbon.h and CoreFoundation.h pull in
transitively. Restore the two removed-API calls in runtime.zig's
quit-teardown path (posix.write/posix.openZ), invisible to every prior
Linux-sandbox build because that code is only reachable through a
comptime-pruned macOS-only branch. Fix a startup panic in the control and
notify socket accept loops: std.Io.net.Server.accept treats EAGAIN on a
non-blocking listening socket as a programmer bug and panics, so both loops
now call a hand-rolled posix_util.accept (mirroring Zig 0.15.2's own
std.posix.accept) to restore the pre-migration non-blocking poll design.

All four issues were invisible to the migration's 15 Linux-sandbox tasks and
their reviews; they surfaced only once the branch was built and actually run
on a real macOS host.
@forketyfork
forketyfork marked this pull request as ready for review September 1, 2026 12:44
@forketyfork
forketyfork merged commit 2a47ab6 into main Sep 1, 2026
4 checks passed
@forketyfork
forketyfork deleted the feat/zig-0-16 branch September 1, 2026 12:44
forketyfork added a commit that referenced this pull request Sep 1, 2026
…#377)

Issue: after merging the Zig 0.16.0 migration (#376), the Homebrew formula
still pinned zig@0.15 as a build dependency, a startup script comment still
blamed a proxy quirk on "Zig 0.15's HTTP client", and the Zig 0.16 package
fetch cache (zig-pkg/) had no .gitignore entry and was showing up untracked.
Solution: bump the formula's zig dependency to zig@0.16 (Homebrew's alias for
the current 0.16.0 mainline formula, mirroring how @0.15 was pinned before),
de-version the startup script comment since there's no evidence the proxy
issue is version-specific, and ignore zig-pkg/ alongside the other Zig cache
directories already listed.
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.

1 participant