Repository navigation
Conversation
…o a deleted source is no longer a declared input (#2452) Root cause: build_cache_graph_key (src/BuildGraphCache.w) hashed build.w, build/*.w, the compiler, with.toml and the recorded env reads, but not the directory listings build(ctx) read. A build.w that declares one input per file under src/ kept serving the cached graph after a file there was deleted: `action target 'use-src' missing declared input: …/src/b.txt` (and, for the compiler's own graph, a false "dependency cycle" after it). The comptime evaluator records `list\t<dir>` for each directory build(ctx) lists (list_files, glob, host_list_files; ComptimeEvaluator record_listing_effect), and the key re-lists each one by name (build_cache_graph_env_fingerprint). A file's contents do not move the key. Evidence (stage1, a project whose build.w lists src/): before missing declared input: …/src/b.txt after build.w.effects records `list\t…/src`; the graph is re-evaluated, no missing input Test: test/internals/graph_cache_listing_key_test.w (fails before: the deleted-file key assertion).
Contributor
Author
|
Battery green on the stack top (fix-2452, 4c4d19f), driven by the pinned seed The gate ( |
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.
Root cause: build_cache_graph_key (src/BuildGraphCache.w) hashed build.w,
build/*.w, the compiler, with.toml and the recorded env reads, but not the
directory listings build(ctx) read. A build.w that declares one input per
file under src/ kept serving the cached graph after a file there was
deleted:
action target 'use-src' missing declared input: …/src/b.txt(and, for the compiler's own graph, a false "dependency cycle" after it).
The comptime evaluator records
list\t<dir>for each directory build(ctx)lists (list_files, glob, host_list_files; ComptimeEvaluator
record_listing_effect), and the key re-lists each one by name
(build_cache_graph_env_fingerprint). A file's contents do not move the key.
Evidence (stage1, a project whose build.w lists src/):
before missing declared input: …/src/b.txt
after build.w.effects records
list\t…/src; the graph is re-evaluated, no missing inputTest: test/internals/graph_cache_listing_key_test.w (fails before: the
deleted-file key assertion).
Closes #2452