-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
breaking-change-7.0Incompatible flags to be flipped in Bazel 7.0Incompatible flags to be flipped in Bazel 7.0incompatible-changeIncompatible/breaking changeIncompatible/breaking changemigration-readyIncompatible flag is ready for migration with Bazel rolling releases or Bazel@last_greenIncompatible flag is ready for migration with Bazel rolling releases or Bazel@last_greenteam-Configurabilityplatforms, toolchains, cquery, select(), config transitionsplatforms, toolchains, cquery, select(), config transitionstype: process
Description
With this flag enabled, the visibility of a target referenced in a private attribute of a rule is first checked relative to the package that contains the rule definition. If it is visible from the definition, it no longer needs to be visible from the rule usage.
This allows rule authors to limit the visibility of tools and config_settings
used internally by a rule. Previously, these targets usually had to have public visibility so that the rule could be used everywhere.
The change can be temporarily disabled via --noincompatible_visibility_private_attributes_at_definition
.
Migration:
- Since visibility is still checked relative to the target as a fallback, this change should not result in any new visibility errors.
- If you want to limit the packages that can use a given rule, use load visibility instead.
Wyverald and martis42
Metadata
Metadata
Assignees
Labels
breaking-change-7.0Incompatible flags to be flipped in Bazel 7.0Incompatible flags to be flipped in Bazel 7.0incompatible-changeIncompatible/breaking changeIncompatible/breaking changemigration-readyIncompatible flag is ready for migration with Bazel rolling releases or Bazel@last_greenIncompatible flag is ready for migration with Bazel rolling releases or Bazel@last_greenteam-Configurabilityplatforms, toolchains, cquery, select(), config transitionsplatforms, toolchains, cquery, select(), config transitionstype: process