Repository navigation
Closed
Description
Root cause (2026-09-27, deep dive; supersedes the first write-up, which was wrong — the build in question exited rc=1 and nothing mixed generations).
Chain
seed.lockpins the darwin seed7456c37b…=nightly-20260925-local-1-607a52f543e7, cut from 607a52f (2026-09-25 12:56) — before Link: an out/lib under the cwd is linked only when it is this compiler's runtime byte for byte (D30, #761 class) #1720 (2911b1d, 2026-09-26 12:23), the D30 rule that an on-diskout/lib/out/bootstrap-libis linked only when itsrt_core.ois byte-identical to the compiler's embedded one. The seed binary has nolink_stage_runtime_dir_is_this_generationsymbol; the fresh stage2/release do.- In a checkout whose
out/lib/out/bootstrap-libhold runtime objects from an older tree (in/Users/eric/with: 2026-09-22,rt_core.o389,840 bytes, withoutwith_vec_free_buffer_drop_origin, added 09-25 by c5aaf76),src/main buildfirst compiles the native build runner (build_runner_ensure, src/main.w:1568) with the seed. The seed's codegen references that symbol; the seed's Link.w takes the first complete on-disk runtime dir unchecked →Undefined symbols … _with_vec_free_buffer_drop_origin. - The driver prints
warning: build runner compile failed; actions fall back to comptime evaluationand continues (a silent fallback, CLAUDE.md "No Silent Fallbacks"). The seed's evaluator then fails onembedded-clang-resource-source(generic comptime function expects 1 type argument(s), found 0); stage1 and everything after aresurvey: skipping; rc=1 at 173.9 s. - A second
src/main buildpasses (my "build 3") only because the failed run had already rebuiltout/bootstrap-lib(the bootstrap-* object targets ran before the failure), so the runner then linked against fresh bootstrap objects. Deleting stage1/seed-input.jsonwas a coincidence, not the fix.out/release/bin/withfrom 09-22 stayed in place meanwhile and was what reproduced Optional chain resets its receiver: a secondo?.fieldon the same Option reads Some(<empty>) (struct and tuple payloads) #1710.
Reproduction (scratch worktree, done)
git checkout a4a0d7d7 + its seed (nightly-20260922, 7c3ed983…) + src/main build → then git checkout 5b6830b1 + pinned seed 7456…:
src/main build→ rc=1 at 174.2 s, same log as above.src/main build :abi-hash-check --no-depswithout/.build-state/build-runner{,.key}and the target state removed: fails with eitherout/liborout/bootstrap-libpresent (stale), passes with both removed ([build] runner compiled 18.5s, embedded runtime).src/main run vec.w(a Vec program) in the same checkout: undefined symbol; the freshout/stage/bin/with-stage2andout/release/bin/withprint1 abthere (Link: an out/lib under the cwd is linked only when it is this compiler's runtime byte for byte (D30, #761 class) #1720 works in them).--explain stage1after the seed swap:stale: action signature changed (target, producer, action-code, compiler-source)— the build cache is not at fault.
Fixes
- Seed bump: pin a darwin seed cut after 2911b1d.
nightly-20260926-local-1-2e8defaa18efhas no darwin asset (its darwin leg did not publish) — cut one. - Driver (
build_runner_ensure): compile the runner withWITH_OUT_DIRpointed at an empty per-build directory so every seed, old or new, links it from its embedded runtime (verified: with no on-disk runtime dirs the old seed links it fine). Takes effect in the next seed. - No silent fallback: when the runner compile fails, say what failed (the linker's first undefined symbol) and that the on-disk
out/lib/out/bootstrap-libare from another compiler generation; when the comptime fallback then cannot evaluate an action, name that as the consequence. - Now, in tree code the current seed runs (
tools/battery.w/:gatepreflight): record the seed digest inout/.build-state; on a change, removeout/lib,out/bootstrap-libandout/tmp/with_runtimebefore the build.
Activity
[-]Build cache: a stage1 built by a previous seed was reused after the seed changed; the mixed-generation release binary reproduced #1710 while the properly seeded build did not[/-][+]Pinned darwin seed (607a52f5, 09-25) predates #1720: it links the native build runner against a stale out/lib, the runner fails, and the driver's silent comptime fallback then fails the build (no stage1 ever ran)[/+]Build: the native runner links against the bootstrap link root once i…
Build: the runner may link when no runtime directory on disk is anoth…
Build: `with build :gate`, live-red battery, seed-change runtime clea…
ehartford commentedon Sep 27, 2026
Driver/battery half landed on main in #1795 (squash 9993935): the runner is compiled only once no on-disk runtime directory is another generation's (or the bootstrap root was prepared in this run) and linked with WITH_OUT_DIR naming the build's root;
embedded-clang-resource-sourceordered after the prepared root; the fallback is a loud error;tools/battery.wremoves out/lib, out/bootstrap-lib and out/tmp/with_runtime when the driving seed changed. Remaining: cut and pin a darwin seed after #1720 (in progress; this issue closes with that seed.lock bump).seed: pin nightly-20260927-local-1-99939352ffda, the darwin seed that…
seed: pin nightly-20260927-local-1-99939352ffda, the darwin seed that…
seed: pin nightly-20260927-local-1-99939352ffda, the darwin seed that…
seed: pin nightly-20260927-local-1-99939352ffda, the darwin seed that…
Comptime: str.trim/index_of/to_upper/to_lower/repeat evaluate; an act…
#2024: pipeline stage calls get the callee's default arguments; #2026:…