Repository navigation
Track toolchain implementations in query mode - #619
Merged
tinder-maxwellelliott merged 1 commit intoNov 4, 2026
Merged
tinder-maxwellelliott merged 1 commit into
tinder-maxwellelliott merged 1 commit into
Conversation
Bazel omits the implementation of a native toolchain declaration from its ordinary query inputs. Read the implementation label from the toolchain attribute so changing the implementation also impacts its registration. For an unflattened select, include each reported implementation. Invalidate cached ordinary graphs and regenerate older partial recipes that lack these edges. The regression builds a changed toolchain product and checks the registration distance.
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.
Bazel declares the implementation of a native
toolchainrule as aNODEP_LABEL. Ordinary query emits it as a string attribute withnodep=trueand omits it from the registration's rule inputs. As a result, changing only the implementation left the registration out of the impacted targets. 1Track the implementation labels that query reports. The regression changes a toolchain's output and checks that its implementation has target distance 0 and its registration has distance 1. For
toolchain = select(...)with multiple possible values, pass--bazelCommandOptions=--noproto:flatten_selectsto retain all branches. Bazel's default flattened output omits those scalar values. 2Invalidate earlier ordinary-query cache entries and regenerate older partial recipes whose inputs omit the edge. This covers registration targets. Identifying which rules resolve those toolchains is a separate query problem.
Prepared by Codex on behalf of Tamir Duberstein.