Skip to content

tier2: rebuild objects ninja recorded with no header dependencies (#2244) - #2249

Merged
zackees merged 2 commits into
masterfrom
fix/2244-tier2-depless-objects
Oct 24, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/2244-tier2-depless-objects

Conversation

@zackees

@zackees zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member

Refs #2244

Local Tier 2 reuses a build volume per checkout. In some volumes, ninja has recorded objects with zero header dependencies. Ninja never rebuilds such an object after a header edit, so Tier 2 tests old libobs code, and the local gate can stamp that run. Of the 23 obs-rust-linux-validate-build-* volumes on this machine, two are affected (925 and 716 objects, libobs unity groups and its PCH among them); the rest have none.

Guard (this PR): rust/tools/linux-validate/drop-depless-objects.sh runs in validate.sh before the build. It deletes every object that ninja -t deps lists as #deps 0, so ninja compiles it again from the current sources. A zccache hit is keyed on those sources too, so the result can't be stale. Every C/C++ object includes at least stdc-predef.h, so zero deps is never right. A tree without a ninja build (first run) is left alone.

  • RED (test: Tier 2 must rebuild objects…): ci/test_tier2_depless_objects.py fails all 3 cases (no script, no call in validate.sh).
  • GREEN: they pass, with a fake ninja printing real-format -t deps output: zero-deps objects deleted, objects with deps kept, a clean tree untouched. ./lint ok.
  • On the real affected volume (…-e829c156d95d, read-only): the script's pattern matches 716 objects, all present. That's exactly the 716 #deps 0 count.

Root cause, not found yet. In the validate image's zccache 1.15.5, none of these reproduce empty depfiles:

  • a cache hit with -MD -MF;
  • a hit with a CMake-style PCH (-x c-header .gch, then -include);
  • 900 warm compiles across 300 sources at ninja -j32;
  • the ZCCACHE_DISABLE=1 pass-through used by validate.sh's recovery build.

Something rarer leaves an empty depfile, and #2244 stays open for it. This guard makes Tier 2 correct whatever the cause.

@zackees
zackees enabled auto-merge October 24, 2026 21:52
@zackees
zackees added this pull request to the merge queue Oct 24, 2026
Merged via the queue into master with commit 7b09975 Oct 24, 2026
35 checks passed
@zackees
zackees deleted the fix/2244-tier2-depless-objects branch October 26, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant