Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/build/zig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* is trusted, collapse both back to one constant.
*/
export const ZIG_COMMIT = "365343af4fc5a1a632e6b54aadd0b87be30edd81";
export const ZIG_COMMIT_PARALLEL = "7d3c0c9b3698d6ce57ef632833e71cab05b783b6";
export const ZIG_COMMIT_PARALLEL = "445fc0cbba4eea579e5c846f2b8be7c9bdc4e1cc";

Check failure on line 42 in scripts/build/zig.ts

View check run for this annotation

Claude / Claude Code Review

ZIG_COMMIT_PARALLEL autobuild release not yet published

The PR was merged before the autobuild release for `445fc0cbba4eea579e5c846f2b8be7c9bdc4e1cc` was published on oven-sh/zig, causing all bootstrap asset URLs to return HTTP 404. Every macOS and Linux developer pulling main will fail at the zig compiler fetch step; the fix is to either wait for the autobuild workflow to complete and publish the release, or revert and re-merge once it is available.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 The PR was merged before the autobuild release for 445fc0cbba4eea579e5c846f2b8be7c9bdc4e1cc was published on oven-sh/zig, causing all bootstrap asset URLs to return HTTP 404. Every macOS and Linux developer pulling main will fail at the zig compiler fetch step; the fix is to either wait for the autobuild workflow to complete and publish the release, or revert and re-merge once it is available.

Extended reasoning...

What the bug is: ZIG_COMMIT_PARALLEL in scripts/build/zig.ts (line 42) was bumped to 445fc0cbba4eea579e5c846f2b8be7c9bdc4e1cc, but the autobuild release tag autobuild-445fc0cbba4eea579e5c846f2b8be7c9bdc4e1cc does not yet exist on the oven-sh/zig GitHub repository. This means any URL constructed by zigDownloadUrl() pointing at that release will return HTTP 404. The PR description itself contained an explicit guard: "Don't merge until autobuild for 445fc0cbba finishes on oven-sh/zig" — this gate was not respected at merge time (commit d85cf23).

Specific code path that triggers it: defaultZigCommit(ci=false, hostOs) returns ZIG_COMMIT_PARALLEL for all non-CI, non-Windows platforms (i.e., macOS and Linux local dev builds). This value flows into cfg.zigCommit, which is used by zigDownloadUrl() to construct the URL: https://github.com/oven-sh/zig/releases/download/autobuild-${cfg.zigCommit}/${zipName}. fetchZig() then calls downloadWithRetry(url, ...) against this 404-returning URL.

Why existing code does not prevent it: There is no runtime check verifying the release exists before building the download URL. The process gate was entirely manual (the NOTE in the PR description), and it was bypassed at merge time. downloadWithRetry() will simply receive HTTP 404 responses and ultimately fail, halting the build.

Impact: Any macOS or Linux developer who runs a local Bun build after pulling main will see a fatal error during the zig compiler fetch step. The stable ZIG_COMMIT (used by CI and Windows) is unaffected; this only impacts ZIG_COMMIT_PARALLEL which is the path taken for all non-CI, non-Windows builds.

Step-by-step proof:

  1. PR merges commit d85cf23 setting ZIG_COMMIT_PARALLEL = "445fc0cbba4eea579e5c846f2b8be7c9bdc4e1cc".
  2. Developer on macOS/Linux runs a local build; defaultZigCommit(false, "darwin") returns ZIG_COMMIT_PARALLEL.
  3. zigDownloadUrl() constructs https://github.com/oven-sh/zig/releases/download/autobuild-445fc0cbba4eea579e5c846f2b8be7c9bdc4e1cc/bootstrap-aarch64-macos-none.zip.
  4. Independent curl checks confirm HTTP 404 for all tested assets: bootstrap-x86_64-linux-musl.zip, bootstrap-aarch64-macos-none.zip, bootstrap-x86_64-macos-none.zip (and aarch64-linux-musl).
  5. git ls-remote --tags shows no autobuild-445fc0cbba... tag on oven-sh/zig.
  6. downloadWithRetry() fails; local build aborts.

Addressing the refutation: The refutation claims the autobuild was "presumably complete at merge time" since the PR was merged. However, four independent verifiers each performed live curl checks specifically against 445fc0cbba4eea579e5c846f2b8be7c9bdc4e1cc (not the prior intermediate hash c38724a979 checked by CodeRabbit) and all received HTTP 404. The refutation assertion is contradicted by direct empirical evidence. The issue will self-resolve once the autobuild workflow completes, but the premature merge has created a broken state for all local macOS/Linux developers in the interim.

How to fix: Wait for the autobuild-445fc0cbba4eea579e5c846f2b8be7c9bdc4e1cc release to be published on oven-sh/zig (verify with curl), or revert commit d85cf23 until the release is available.


/**
* The one place that picks which compiler to use. Everything coupled to
Expand Down
Loading