[9.0.1] Fix visibility for implicit deps of parent rules (https://github.com/bazelbuild/bazel/pull/28627)#28687
Merged
meteorcloudy merged 1 commit intobazelbuild:release-9.0.1from Feb 18, 2026
Conversation
The visibility of a default value of an implicit dep in an extended rule should be checked relative to the definition of the rule that introduced it, which may not be the child rule. Fixes bazelbuild#28618 Closes bazelbuild#28627. PiperOrigin-RevId: 871303947 Change-Id: I0027e277dc9f01396fa4674297d2a73e1e9d257e
There was a problem hiding this comment.
Code Review
This pull request correctly fixes a bug in visibility checking for implicit dependencies within extended Starlark rules. The change ensures that for private implicit attributes, the visibility of a default value is checked against the package where the attribute was originally defined by traversing up the rule's inheritance hierarchy. This is the correct behavior since private attributes cannot be overridden. The new test case effectively validates this fix. The changes look good.
meteorcloudy
approved these changes
Feb 18, 2026
Merged
via the queue into
bazelbuild:release-9.0.1
with commit Feb 18, 2026
2a933f9
46 checks passed
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.
The visibility of a default value of an implicit dep in an extended rule should be checked relative to the definition of the rule that introduced it, which may not be the child rule.
Fixes #28618
Closes #28627.
PiperOrigin-RevId: 871303947
Change-Id: I0027e277dc9f01396fa4674297d2a73e1e9d257e
Commit a16489f