Repository navigation
Fix wrong cached objects after line-shifting edits and response-file changes - #1687
Merged
Merged
Conversation
This was referenced Oct 17, 2026
fastcache-cc: -march=native is keyed as literal text, so one CPU's object is served to another
#1688
Closed
Closed
Closed
Closed
Yaraslaut
force-pushed
the
fix/key-line-structure-and-response-files
branch
from
November 21, 2026 10:33
6078948 to
5343191
Compare
…o a line-shifting edit is no longer served the old object The key hashed `-E -P` / `/EP` output, which drops line markers and collapses blank and comment lines. So inserting a comment above a function left the hashed text byte-identical while std::source_location, __builtin_LINE and every -g line table moved: one key, two different objects, and the edited file was served the object built before the edit. Reproduced end to end with the launcher: after adding three comment lines the compile was a HIT whose function reported line 2, where a real compile reports 5. The probe now keeps its markers (`-E`, `/E`), and KeyedPreprocessedText reduces each marker -- GNU's `# N "path" flags` and MSVC's `#line N "path"` -- to its line number and flags before hashing. Dropping the path keeps the key portable, which is all the suppression was for: __FILE__ is already expanded in the text, and a name recorded after preprocessing is root binding's and the prefix maps' to answer. Catch2 across two folders still shares 107 of 107. objkey-v9 / manifest-v10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CnCkwgtUsaSM5HcgB3APNU
Yaraslaut
force-pushed
the
fix/key-line-structure-and-response-files
branch
from
November 21, 2026 14:49
5343191 to
73323cc
Compare
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.
Two ways the compile cache served an object built from something other than what was asked, both reproduced end to end with the launcher. Builds on #1686.
Changes
-E -P//EPoutput, which drops line markers and collapses blank and comment lines. Inserting a comment above a function therefore left the key unchanged, whilestd::source_location,__builtin_LINEand every-gline table moved.-E,/E).KeyedPreprocessedTextreduces each marker (GNU# N "path" flags, MSVC#line N "path") to its line number and flags, so the key stays portable: Catch2 across two folders still shares 107 of 107.@fileitself, so both the object key and the direct-mode manifest key hashed only its name.-O0to-O2inside the file was answered with the-O0object.ResponseFileKeyItemskeys each file's bytes, with the source root, build tree and dependency cache tokenized.objkey-v9/manifest-v10.compile-cache.md,AGENT.mdtripwire) anddocs/tools/fastcache-cc.mdare updated.Both came out of an audit of the cache for wrong-object paths; the remaining findings are being filed as separate issues.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CnCkwgtUsaSM5HcgB3APNU