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: 940543514 Change-Id: Ic85d3f919980a4d47206250c8536a135d61d4bf2
diff --git a/absl/flags/BUILD.bazel b/absl/flags/BUILD.bazel index b5ecb7f..79b8f7f 100644 --- a/absl/flags/BUILD.bazel +++ b/absl/flags/BUILD.bazel
@@ -25,7 +25,7 @@ ) package( - default_visibility = ["//visibility:public"], + default_visibility = ["//visibility:private"], features = [ "header_modules", "layering_check", @@ -88,6 +88,7 @@ ], copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, + visibility = ["//visibility:public"], deps = [ ":path_util", ":program_name", @@ -109,6 +110,7 @@ ], copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, + visibility = ["//visibility:public"], deps = [ "//absl/base:config", "//absl/base:core_headers", @@ -149,6 +151,7 @@ ], copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, + visibility = ["//visibility:public"], deps = [ ":commandlineflag_internal", "//absl/base:config", @@ -193,6 +196,7 @@ ], copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, + visibility = ["//visibility:public"], deps = [ ":commandlineflag", ":commandlineflag_internal", @@ -248,6 +252,7 @@ ], copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, + visibility = ["//visibility:public"], deps = [ ":commandlineflag", ":config", @@ -301,6 +306,7 @@ ], copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, + visibility = ["//visibility:public"], deps = [ ":usage_internal", "//absl/base:config", @@ -320,6 +326,7 @@ ], copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, + visibility = ["//visibility:public"], deps = [ ":commandlineflag", ":commandlineflag_internal",