Skip to content

[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
bazel-io:cp28627-9.0.1
Feb 18, 2026
Merged

[9.0.1] Fix visibility for implicit deps of parent rules (https://github.com/bazelbuild/bazel/pull/28627)#28687
meteorcloudy merged 1 commit intobazelbuild:release-9.0.1from
bazel-io:cp28627-9.0.1

Conversation

@bazel-io
Copy link
Copy Markdown
Member

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

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
@bazel-io bazel-io requested a review from a team as a code owner February 17, 2026 15:26
@bazel-io bazel-io added team-Configurability platforms, toolchains, cquery, select(), config transitions awaiting-review PR is awaiting review from an assigned reviewer labels Feb 17, 2026
@bazel-io bazel-io requested a review from brandjon February 17, 2026 15:26
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@iancha1992 iancha1992 added this pull request to the merge queue Feb 18, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 18, 2026
@meteorcloudy meteorcloudy added this pull request to the merge queue Feb 18, 2026
Merged via the queue into bazelbuild:release-9.0.1 with commit 2a933f9 Feb 18, 2026
46 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Configurability platforms, toolchains, cquery, select(), config transitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants