make build-bin: on macOS, build with bun's pinned release build (closes #251) #252

Merged
clawbot merged 1 commits from issue-251-macos-bun-release-build into next 2026-11-12 02:17:25 +01:00
Collaborator

Closes #251.

On macOS, script/build-bin now downloads bun 1.3.13's release archive (bun-darwin-x64-baseline on Intel, bun-darwin-aarch64 on Apple silicon), checks its SHA-256 and compiles bin/quak with it, as it already does on Linux. nixpkgs' macOS bun loads ICU from the nix store; the release builds load only /usr/lib/libicucore.A.dylib, libresolv, libc++ and libSystem (read from the Mach-O load commands of both archives). nix-shell is gone from the script, so make install no longer needs nix; any other system stops with an error.

Things the diff does not show:

  • The hash check uses shasum -a 256 when sha256sum is not on PATH, since not every macOS ships sha256sum.
  • Unverified: no Mac was available, so otool -L on a built ~/bin/quak was not run.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/quak/issues/251. On macOS, `script/build-bin` now downloads bun 1.3.13's release archive (`bun-darwin-x64-baseline` on Intel, `bun-darwin-aarch64` on Apple silicon), checks its SHA-256 and compiles `bin/quak` with it, as it already does on Linux. nixpkgs' macOS bun loads ICU from the nix store; the release builds load only `/usr/lib/libicucore.A.dylib`, `libresolv`, `libc++` and `libSystem` (read from the Mach-O load commands of both archives). `nix-shell` is gone from the script, so `make install` no longer needs nix; any other system stops with an error. Things the diff does not show: - The hash check uses `shasum -a 256` when `sha256sum` is not on `PATH`, since not every macOS ships `sha256sum`. - Unverified: no Mac was available, so `otool -L` on a built `~/bin/quak` was not run. Model: opus-5-5
clawbot self-assigned this 2026-11-12 00:44:38 +01:00
clawbot added the needs-review label 2026-11-12 00:44:44 +01:00
Author
Collaborator

Verdict: FAIL
Head: c9c9e3e49d

  1. script/build-bin lines 35-40 and test/packaging/build-bin.test.ts (the two Darwin rows of the first it.each): no test runs the new shasum -a 256 -c - line. On a Mac without sha256sum, that line is the only hash check. Every test finds the host's sha256sum first, and the Alpine test phase has no shasum. So changing the line to shasum -a 256 -c - || true leaves the suite green. The Darwin rows also run with the stub GNU ldd, and their titles say "with glibc"; a Mac has neither. The README says all work on quak is test-driven.
    • Acceptable: the Darwin rows run on a PATH that finds neither sha256sum nor ldd. That PATH holds the stubs, a stub shasum that logs its arguments and exits 1, and links to the few real commands the script and the stubs use.
    • Those rows check that shasum got -a 256 -c -, that unzip never ran and that there is no bin/quak.
    • Their titles name no C library.
  2. README.md line 161: "make install works on Linux and macOS." is false on Linux machines other than x86-64 and arm64, where script/build-bin stops with an error. Acceptable: "make install works on Linux and macOS, on x86-64 and arm64."
  • Unverified: a build on a real Mac; none is available.
  • Judgement call, not a finding: the nix-shell fallback is gone for systems other than Linux and macOS, because nix's installer supports no other system.

Model: opus-5-5

Verdict: FAIL Head: c9c9e3e49d853f68e36671632ba1f57f613fcfea 1. `script/build-bin` lines 35-40 and `test/packaging/build-bin.test.ts` (the two `Darwin` rows of the first `it.each`): no test runs the new `shasum -a 256 -c -` line. On a Mac without `sha256sum`, that line is the only hash check. Every test finds the host's `sha256sum` first, and the Alpine `test` phase has no `shasum`. So changing the line to `shasum -a 256 -c - || true` leaves the suite green. The `Darwin` rows also run with the stub GNU `ldd`, and their titles say "with glibc"; a Mac has neither. The README says all work on quak is test-driven. - Acceptable: the `Darwin` rows run on a `PATH` that finds neither `sha256sum` nor `ldd`. That `PATH` holds the stubs, a stub `shasum` that logs its arguments and exits 1, and links to the few real commands the script and the stubs use. - Those rows check that `shasum` got `-a 256 -c -`, that `unzip` never ran and that there is no `bin/quak`. - Their titles name no C library. 2. `README.md` line 161: "`make install` works on Linux and macOS." is false on Linux machines other than x86-64 and arm64, where `script/build-bin` stops with an error. Acceptable: "`make install` works on Linux and macOS, on x86-64 and arm64." - Unverified: a build on a real Mac; none is available. - Judgement call, not a finding: the `nix-shell` fallback is gone for systems other than Linux and macOS, because nix's installer supports no other system. Model: opus-5-5
clawbot force-pushed issue-251-macos-bun-release-build from c9c9e3e49d to a7bbaf954f 2026-11-12 01:23:27 +01:00 Compare
Author
Collaborator
  1. Done in a7bbaf9: the two macOS rows are now their own it.each in test/packaging/build-bin.test.ts, run on the PATH that makeMacPath builds.
  2. Done in a7bbaf9, with the suggested sentence.

Model: opus-5-5

1. Done in `a7bbaf9`: the two macOS rows are now their own `it.each` in `test/packaging/build-bin.test.ts`, run on the `PATH` that `makeMacPath` builds. 2. Done in `a7bbaf9`, with the suggested sentence. Model: opus-5-5
Author
Collaborator

Verdict: FAIL
Head: a7bbaf954f

  1. test/packaging/build-bin.test.ts, the four Linux rows of the first it.each: the new stub shasum, which always fails, is now on their PATH. So they pass even when script/build-bin drops its sha256sum branch and checks every hash with shasum. A stock Alpine has no shasum, so that script would stop make install on every Alpine machine while the suite stays green. Before this change, those rows proved that the sha256sum check stops the script.
    • Acceptable: each Linux row also asserts expect(ran("shasum")).toBe(false).
  • Unverified: a build on a real Mac; none is available.

Model: opus-5-5

Verdict: FAIL Head: a7bbaf954fd6bc65286acb58eefd6f1d383476f6 1. `test/packaging/build-bin.test.ts`, the four `Linux` rows of the first `it.each`: the new stub `shasum`, which always fails, is now on their `PATH`. So they pass even when `script/build-bin` drops its `sha256sum` branch and checks every hash with `shasum`. A stock Alpine has no `shasum`, so that script would stop `make install` on every Alpine machine while the suite stays green. Before this change, those rows proved that the `sha256sum` check stops the script. - Acceptable: each `Linux` row also asserts `expect(ran("shasum")).toBe(false)`. - Unverified: a build on a real Mac; none is available. Model: opus-5-5
clawbot added 1 commit 2026-11-12 01:47:22 +01:00
nixpkgs points its macOS bun at an ICU in the nix store, and bun build
--compile copied that reference into bin/quak, so nix-collect-garbage could
break the cron backup. script/build-bin now downloads bun 1.3.13's release
archive on macOS too, Intel (baseline) or Apple silicon, checks its SHA-256,
and compiles with it. Those builds load only /usr/lib libraries. nix-shell is
no longer used; any system without a bun release build stops with an error.
The hash check falls back to shasum where sha256sum is missing.

Model: opus-5-5
clawbot force-pushed issue-251-macos-bun-release-build from a7bbaf954f to 1a73c891eb 2026-11-12 01:47:22 +01:00 Compare
Author
Collaborator
  1. Done in 1a73c89: each Linux row asserts that shasum never ran, and the comment above the rows says why.

Model: opus-5-5

1. Done in `1a73c89`: each `Linux` row asserts that `shasum` never ran, and the comment above the rows says why. Model: opus-5-5
Author
Collaborator

Verdict: PASS
Head: 1a73c891eb

On macOS, script/build-bin now compiles with bun's hash-pinned release build instead of nix-shell, as #251 asks.

  • Unverified: a build on a real Mac; none is available.

Model: opus-5-5

Verdict: PASS Head: 1a73c891eb1b4fc06cc5385c0f5c04a6cbbf3724 On macOS, `script/build-bin` now compiles with bun's hash-pinned release build instead of `nix-shell`, as https://git.eeqj.de/sneak/quak/issues/251 asks. - Unverified: a build on a real Mac; none is available. Model: opus-5-5
clawbot merged commit 9bd7e8f099 into next 2026-11-12 02:17:25 +01:00
Sign in to join this conversation.