Repository navigation
fix(pace-cc): direct mode keys what a manifest cannot name - #1763
Merged
Merged
Conversation
A direct-mode manifest's key is computed before any header is opened, and a hit re-checks only what the manifest lists. Every input it neither listed nor keyed was one a change to which still direct-hit the old object, under a zero exit code: - Library headers (#1694, #1718): only a compiler's OWN install is covered by the toolchain stamp. A vcpkg tree, /usr/include/<lib> or any prefix outside the roots is now recorded (root token where it has one, absolute path otherwise) and re-hashed. Library entries are not counted against NoProjectDeps and are hashed after it, so #319's hollow manifest is still refused by name. - The environment (#1693, #1756): CL, _CL_, CCC_OVERRIDE_OPTIONS, COMPILER_PATH and GCC_EXEC_PREFIX refuse caching -- an argument arriving that way is invisible to every command-line check and never reaches a worker. INCLUDE, CPATH and the other include-search variables are folded into the manifest key. One table, CompilerEnvironmentTable(). - Response files (#1756): @file arguments are expanded before ParseCommand, by the driver family's grammar; one that cannot be expanded exactly runs uncached. - Shadowing headers (#1754): the manifest records a ShadowCensus of the same-named files along the search path, and a hit whose census differs is refused. manifest-v11 retires every v10 manifest; the manifest wire version moves to 2. objkey does not move. Measured against cl 19.51: master's launcher served a stale object in 8 of 18 steps of the issues' scenarios, this one in none, and unchanged rebuilds still direct-hit. run-launcher-e2e.ps1 gains the scenarios. Closes #1693 Closes #1694 Closes #1718 Closes #1754 Closes #1756 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…I's other compilers GCC and Clang refuse a designated initializer that omits a member (-Wmissing-field-initializers), MSVC's release build read a raw literal carrying an escaped quote inside an assertion macro as an escape sequence (C4129), and clang-tidy refuses a concatenation that allocates a temporary. Refs #1754 Refs #1756 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ount at least two Since #1718 a manifest also records library headers outside the roots, and gcc lists /usr/include/stdc-predef.h in every depfile, so the relative-paths case's manifest has three entries where it asserted exactly two. The header's presence is proven by the edited-header step that follows, by behaviour rather than by count. Refs #1718 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st initializer clang-tidy refuses the escaped spelling (modernize-raw-string-literal) and the older MSVC on CI's Windows runners mis-read a raw literal carrying an escaped quote inside a macro ARGUMENT (C4129), so the literals are raw and live in named variables. SampleManifest() was the one designated initializer still missing the shadow census. Refs #1754 Refs #1756 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 12, 2026
…e host's separator A Windows layout resolves into backslashes on a Windows host and keeps forward slashes on a POSIX one, so the two HeaderSearchDirectories cases failed on every Linux leg (and with them the Linux e2e's control suite) while passing on Windows. Refs #1754 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Direct mode served a stale object whenever an input changed that the manifest neither listed nor keyed. Its key is taken before any header is opened, and a hit re-checks only the listed files. This closes the four instances filed:
/usr/include/<lib>, any prefix outside the roots)CL,_CL_,CCC_OVERRIDE_OPTIONS,COMPILER_PATH,GCC_EXEC_PREFIXINCLUDE,EXTERNAL_INCLUDE,CPATH,C/CPLUS/OBJC_INCLUDE_PATH,SDKROOT@response-filecontentscl/clang-cl, libiberty's for gcc/clang). A file that cannot be expanded exactly runs uncachedmanifest-v11retires every v10 manifest, including ones already poisoned in shared caches. The manifest wire version moves to 2.objkeydoes not move, because the objects are correct under their own keys.Known limitation, documented
A shadow reached through a spelling that climbs out of its directory (
#include "../x.h") is not detected. The launcher sees the paths the compiler opened, never the#includetext. This is indocs/tools/pace-cc.mdand in the new rulebook section.Testing
pace-cc-tests: 1147 cases pass, 7 skipped by host (symlink rights, a ctest-only variable). New suites:CompilerEnvironment_test,ResponseFiles_test,ShadowCensus_test.DirectManifest_testadds library-header, census andNoProjectDeps-ordering cases; v10 joins the retired digests.ctest -R compile-cache-e2e(Windows, cl and clang-cl) passes. It gains a case covering shadowing,INCLUDE, a response file's contents,_CL_and a vcpkg port upgraded in place, plus an unchanged-rebuild control that must still direct-hit.Control, the issues' scenarios against real
cl19.51:Not run locally: the Linux legs of
scripts/local-gate.shand the pinned clang-tidy sweep. Formatting uses the pinned clang-format 22.1.8.Closes #1693
Closes #1694
Closes #1718
Closes #1754
Closes #1756
🤖 Generated with Claude Code