Skip to content

build: the seed-driven gates relink stage2 + the release compiler on every step (~2.5–3.5 min each; only /Brepro keeps it byte-identical) #1157

Closed

Description

@ehartford

Every seed-driven gate step relinks the release compiler. From a darwin battery log (build → :fixpoint → :test): [stage2] wrote … and [link-compiler] wrote out/release/bin/with.unstamped appear in each step, ~73 s + ~72 s apiece; on the Windows Release leg it is ~100 s + ~100 s per step, four times per job. Fixpoint and the marker checks are unaffected only because the relinked output is byte-identical (and on Windows it was not until /Brepro, which is why last-green reported a stale marker there — see the release PR).

Expected: after build, :fixpoint/:test/:last-green find stage2 and link-compiler fresh and rebuild nothing. Something in stage2's declared inputs changes between invocations under the seed driver. with build --explain stage2 after a build should name it ("freshness: stale: input changed: ").

Cost: ~2.5 min per gate step on darwin, ~3.5 min on Windows; roughly 10 minutes per Release leg and per local battery.

Activity

  1. ehartford commented on Sep 17, 2026

    @ehartford
    ContributorAuthor

    Root located in the pinned seed and current source. build_cache_collect_output_paths (src/BuildGraphCache.w:550) always computes root ++ "/" ++ target.output, including Install destinations. Installation itself uses build_graph_expand_install_path, so the two paths disagree.

    After a successful build, src/main build --explain pcre2-wo-install-o says:

    freshness: stale: output missing: $HOME/.local/with-wo/pcre2/darwin_aarch64-d3caee2e5365144c70c236091e7c149b9409fb7f3b07a981cc4ac4b38770ab24/pcre2.o
    

    LLDB stopped in the seed's __wcu$7150$build_cache_collect_output_paths, stepped out into __wcu$7151$build_cache_freshness_reason +4520, and read the returned Vec's first string:

    /Users/eric/with/$HOME/.local/with-wo/pcre2/darwin_aarch64-d3caee2e5365144c70c236091e7c149b9409fb7f3b07a981cc4ac4b38770ab24/pcre2.o
    

    That is not the installed file under /Users/eric/.local/with-wo/. Every install is therefore stale; dep_rebuilt propagates to stage2 and link-compiler. Asking --explain stage2 in isolation reports fresh because its own outputs match and that query does not execute dependencies.

    Evidence: out/with-get-investigation/wo-install-cache-output-lldb.log, wo-install-freshness.log, stage2-freshness-after-build.log, and link-freshness-after-build.log. Fix scope is shared Install output resolution for freshness and execution, covering $HOME, $INSTALL_BINDIR, and $INSTALL_LIBDIR. The frozen seed will retain its old implementation until a later release/reseed; no cache gate should be weakened to conceal that.

  2. added 2 commits that reference this issue on Sep 17, 2026
    1f3a26b
    6c6d7cd
  3. added 3 commits that reference this issue on Sep 19, 2026
    18e698d
    24ef8c7
    667c6d1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions