-
Notifications
You must be signed in to change notification settings - Fork 4.4k
incompatible_enforce_config_setting_visibility #12932
Copy link
Copy link
Closed
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)breaking-change-6.0Incompatible flags to be flipped in Bazel 6.0Incompatible flags to be flipped in Bazel 6.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
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)breaking-change-6.0Incompatible flags to be flipped in Bazel 6.0Incompatible flags to be flipped in Bazel 6.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
Visibility on
config_settingisn't historically enforced. This is purely for legacy reasons. There's no philosophical reason to distinguish them.This flag starts the process of removing the distinction.
Values:
--incompatible_enforce_config_setting_visibility=off: everyconfig_settingis visible to every target, regardless of visibility settings--incompatible_enforce_config_setting_visibility=on:config_settingfollows the policy set by--incompatible_config_setting_private_default_visibility(incompatible_config_setting_private_default_visibility #12933).Incompatibility error:
ERROR: myapp/BUILD:4:1: in config_setting rule //myapp:my_config: target 'myapp:my_config' is not visible from target '//some:other_target. Check the visibility declaration of the former target if you think the dependency is legitimateMigration:
Treat all
config_settings as if they follow standard visibility logic at https://docs.bazel.build/versions/master/visibility.html: have them set visibility explicitly if they'll be used anywhere outside their own package. The ultimate goal of this migration is to fully enforce that expectation.