Change the default visibility for packages to //visibility:private and then change individual build rules back to their prior visibility. The motivation for this change is making sure future additions are private by default so that new rules are not accidentally public. Some of the rules that are currently public were not meant to be, and the fact that they are marked public does not mean they should be used. As always, the rule is never spell out anything with the word internal (or any synonym for internal). Some of these accidentally public rules will be manually corrected with future changes. PiperOrigin-RevId: 940606735 Change-Id: Ie75b0663f712ac2e9960ba8631e13b0fbe97a3c5
diff --git a/absl/cleanup/BUILD.bazel b/absl/cleanup/BUILD.bazel index 461ab37..dad0d6b 100644 --- a/absl/cleanup/BUILD.bazel +++ b/absl/cleanup/BUILD.bazel
@@ -22,7 +22,7 @@ ) package( - default_visibility = ["//visibility:public"], + default_visibility = ["//visibility:private"], features = [ "header_modules", "layering_check", @@ -37,6 +37,7 @@ hdrs = ["internal/cleanup.h"], copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, + visibility = ["//visibility:public"], # Should be private, but cleanup is required. deps = [ "//absl/base:core_headers", "//absl/base:hardening", @@ -51,6 +52,7 @@ ], copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, + visibility = ["//visibility:public"], deps = [ ":cleanup_internal", "//absl/base:config",