Repository navigation
Hash external source files returned by cquery - #590
Merged
tinder-maxwellelliott merged 1 commit intoOct 30, 2026
Merged
tinder-maxwellelliott merged 1 commit into
tinder-maxwellelliott merged 1 commit into
Conversation
A repository rule can symlink a workspace file into its generated repository. Editing the workspace file changed the consuming action's output, but generate-hashes gave the returned external source an empty digest when its repository was not listed for fine-grained hashing. get-impacted-targets then missed the consumer. When cquery returns a canonical source label, hash the regular file at that exact repository path. Preserve existing resolution for missing files and for partial or explicitly supplied inputs.
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.
A repository rule in the regression symlinks a workspace file into its generated repository. Changing that file changed the consuming genrule’s output from
beforetoafter. With--useCquery, Bazel returned the mirror as a source input, but bazel-diff assigned it an empty digest because the repository wasn’t listed for fine-grained hashing.get-impacted-targetsmissed the genrule.For a full configured query, hash a returned regular file at its exact canonical repository path. This lets the existing dependency carry its contents into the consumer’s hash. Missing paths retain the existing repository handling. Unexpected errors reading or inspecting a concrete path report its source label and path.
Prepared with Codex.