Detect impacted targets when MODULE.bazel changes via mod show_repo#322
Open
nollbit wants to merge 1 commit intoTinder:masterfrom
Open
Detect impacted targets when MODULE.bazel changes via mod show_repo#322nollbit wants to merge 1 commit intoTinder:masterfrom
nollbit wants to merge 1 commit intoTinder:masterfrom
Conversation
When running against Bazel 8.6.0+ or 9.0.1+, bazel-diff now queries
bzlmod-managed external repo definitions using:
1. `bazel mod dump_repo_mapping` to discover apparent→canonical names
2. `bazel mod show_repo @@<canonical>... --output=streamed_proto` to
get Build.Repository protos for each repo (modules + extensions)
Synthetic //external:<apparent_name> targets are created from these
protos and merged into the target hash set. In non-cquery mode,
transformRuleInput is now also applied so that external dep changes
propagate to dependent targets.
This fixes the issue where MODULE.bazel changes (e.g. adding a new
bazel_dep or changing a version) would not produce correct fine-grained
diffs, requiring users to fall back to treating everything as affected.
Fixes: Tinder#255
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
When running against Bazel 8.6.0+ or 9.0.1+, bazel-diff now queries bzlmod-managed external repo definitions using:
bazel mod dump_repo_mappingto discover apparent→canonical namesbazel mod show_repo @@<canonical>... --output=streamed_prototo get Build.Repository protos for each repo (modules + extensions)Synthetic //external:<apparent_name> targets are created from these protos and merged into the target hash set. In non-cquery mode, transformRuleInput is now also applied so that external dep changes propagate to dependent targets.
This fixes the issue where MODULE.bazel changes (e.g. adding a new bazel_dep or changing a version) would not produce correct fine-grained diffs, requiring users to fall back to treating everything as affected.
Fixes: #255