From 5e3d88d0fdcca78bc4c6cd5a6b404b761247921d Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Thu, 30 Apr 2026 16:33:35 +0100 Subject: [PATCH] build: pin toolchain versions via tracked .tool-versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds an asdf-readable .tool-versions at repo root pinning the four runtimes that QUICKSTART-USER.adoc requires, and removes the .gitignore line that kept it untracked. asdf convention is to commit this file — it's the equivalent of package.json for the polyglot runtime side. Each pin matches the version that successfully boots boj-rest with all 115 cartridges discoverable on :7700. Without these pins, the next fresh-clone setup hits the version traps surfaced during the 2026-04-30 install: zig 0.15.1 ffi/zig/build.zig was written against 0.15; Zig 0.16's std.Thread API broke 14 compile sites in catalogue/loader/guardian/federation/ coprocessor/sla/community/sdp. asdf-zig latest currently resolves to 0.16, so without a pin every fresh clone fails `just build`. elixir 1.18.4-otp-25 Ubuntu 24.04 LTS apt ships Elixir 1.14, but elixir/mix.exs declares ~> 1.15. The OTP-25 suffix matches the apt erlang-base on 24.04 (Erlang/OTP 25 / erts-13.2.2.5), avoiding a from-source Erlang build via asdf-erlang. idris2 0.8.0 Required for `just verify` and `just typecheck` on the Idris2 ABI. asdf-idris2 builds from source and needs `libgmp-dev` + `chezscheme` from apt — pinning at least removes the moving target. deno 2.7.14 Required by the JS cartridge worker pool. Without it, BojRest.JsWorkerPool falls back to fork-per-call (~200 ms cold start per invoke). The .gitignore line that kept .tool-versions untracked has been removed and replaced with a comment explaining why the file is tracked. Out of scope (deliberate): * asdf-erlang version is left to apt's OTP 25 — switching to asdf-erlang would let us bump Elixir to 1.18+otp-26/27 and gain newer features but adds a 10+ min source build to every cold install. * SPARK / gnatprove and Cranelift's clif-util are still install-time decisions, not runtime-version pins. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 6 ++++-- .tool-versions | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .tool-versions diff --git a/.gitignore b/.gitignore index b67e3d6..1c4933b 100644 --- a/.gitignore +++ b/.gitignore @@ -138,8 +138,10 @@ tools/cartridge-minter/target/ panic-attack-report*.json /json -# asdf version manager -.tool-versions +# asdf version manager — tracked in this repo to pin reproducible +# toolchain versions (zig 0.15.1 not 0.16.0; elixir 1.18+ not apt's 1.14; +# etc.). asdf reads .tool-versions on `cd` into the repo and automatically +# uses the pinned versions. # wokelangiser generated i18n locale files (too large for GitHub) generated/wokelangiser/i18n/ diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..3f22a19 --- /dev/null +++ b/.tool-versions @@ -0,0 +1,4 @@ +zig 0.15.1 +elixir 1.18.4-otp-25 +idris2 0.8.0 +deno 2.7.14