Skip to content

[8.9.0] Check subrule implicit dep visibility against subrule definition - #32358

Merged
iancha1992 merged 1 commit into
bazelbuild:release-8.9.0from
iancha1992:cp32026
Nov 3, 2026
Merged

iancha1992 merged 1 commit into
bazelbuild:release-8.9.0from
iancha1992:cp32026

Conversation

@iancha1992

Copy link
Copy Markdown
Member

Before this, it was checked against the rule using the subrule.

Fixes #31168

RELNOTES: Visibility of implicit dependencies of subrules are checked against the subrule package instead of that of the rule.
PiperOrigin-RevId: 1004754823
Change-Id: I5abdeac5ef2f914e4dee46eb2f9778905c84f1ac

Description

Motivation

Build API Changes

No

Checklist

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

Release Notes

RELNOTES: None

Commit e5729e7

Before this, it was checked against the rule using the subrule.

Fixes bazelbuild#31168

RELNOTES: Visibility of implicit dependencies of subrules are checked against the subrule package instead of that of the rule.
PiperOrigin-RevId: 1004754823
Change-Id: I5abdeac5ef2f914e4dee46eb2f9778905c84f1ac
@iancha1992
iancha1992 requested a review from hvadehra November 2, 2026 23:37
@iancha1992 iancha1992 added awaiting-review PR is awaiting review from an assigned reviewer team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts labels Nov 2, 2026
@iancha1992
iancha1992 requested a review from a team as a code owner November 2, 2026 23:37
@iancha1992
iancha1992 enabled auto-merge November 2, 2026 23:37
@github-actions github-actions Bot added the team-Configurability platforms, toolchains, cquery, select(), config transitions label Nov 2, 2026
@iancha1992

Copy link
Copy Markdown
Member Author

@hvadehra

Cherry-pick of e5729e7 into release-8.9.0.

The following files had merge conflicts or required manual adjustments for release-8.9.0 and should be reviewed more closely:

  • src/main/java/com/google/devtools/build/lib/analysis/BUILD: Added //src/main/java/com/google/devtools/build/lib/starlarkbuildapi to common_prerequisite_validator while preserving //third_party:guava and //third_party:jsr305 on release-8.9.0.
  • src/main/java/com/google/devtools/build/lib/analysis/CommonPrerequisiteValidator.java: Adapted the subrule implicit dependency visibility check in validateDirectPrerequisiteVisibility to release-8.9.0 (which does not use VisibilityCheckState), resolving implicitDefinition to owningSubrule.getExtensionLabel() when maybeGetOwningSubrule matches.
  • src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkSubrule.java: Resolved a nearby conflict with repr(Printer printer) and retained the StarlarkCallable import used on release-8.9.0.

@iancha1992
iancha1992 added this pull request to the merge queue Nov 3, 2026
Merged via the queue into bazelbuild:release-8.9.0 with commit 8dfe24a Nov 3, 2026
43 checks passed
@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Nov 3, 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 team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants