Skip to content

Commit 2da434c

Browse files
authored
cleanup: mark google/cloud/ bazel targets as deprecated (#8550)
Part of: #3701 We want users to only use targets in the top-level //BUILD.bazel file. Very likely nobody is using these targets even right now. But a 90+ day deprecation would be nice. We could extend this to a year if people feel that's necessary.
1 parent 64c75a2 commit 2da434c

25 files changed

Lines changed: 275 additions & 34 deletions

File tree

google/cloud/BUILD.bazel

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
package(default_visibility = ["//visibility:public"])
15+
# TODO(#3701) Change the default_visibility to "//visibility:private", and
16+
# widen visibility as needed with per-target visibility.
17+
package(
18+
default_deprecation = """
19+
These targets are not for public use and will be removed sometime around
20+
2023-03-16. Only use Bazel targets defined in the top-level //BUILD.bazel
21+
file. See https://github.com/googleapis/google-cloud-cpp/issues/3701 for
22+
more details.
23+
""",
24+
default_visibility = ["//visibility:public"],
25+
)
1626

1727
licenses(["notice"]) # Apache 2.0
1828

google/cloud/bigquery/integration_tests/BUILD.bazel

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
package(default_visibility = ["//visibility:public"])
15+
# TODO(#3701) Change the default_visibility to "//visibility:private", and
16+
# widen visibility as needed with per-target visibility.
17+
package(
18+
default_deprecation = """
19+
These targets are not for public use and will be removed sometime around
20+
2023-03-16. Only use Bazel targets defined in the top-level //BUILD.bazel
21+
file. See https://github.com/googleapis/google-cloud-cpp/issues/3701 for
22+
more details.
23+
""",
24+
default_visibility = ["//visibility:public"],
25+
)
1626

1727
licenses(["notice"]) # Apache 2.0
1828

google/cloud/bigquery/samples/BUILD.bazel

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,17 @@
1414

1515
"""Examples for the Cloud BigQuery C++ client library."""
1616

17-
package(default_visibility = ["//visibility:public"])
17+
# TODO(#3701) Change the default_visibility to "//visibility:private", and
18+
# widen visibility as needed with per-target visibility.
19+
package(
20+
default_deprecation = """
21+
These targets are not for public use and will be removed sometime around
22+
2023-03-16. Only use Bazel targets defined in the top-level //BUILD.bazel
23+
file. See https://github.com/googleapis/google-cloud-cpp/issues/3701 for
24+
more details.
25+
""",
26+
default_visibility = ["//visibility:public"],
27+
)
1828

1929
licenses(["notice"]) # Apache 2.0
2030

google/cloud/bigtable/BUILD.bazel

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# TODO(#3701) Change this visibility to "//:__subpackages__" so that users are
16-
# required to use the top-level BUILD file rather than reaching down into this
17-
# one.
18-
package(default_visibility = ["//visibility:public"])
15+
# TODO(#3701) Change the default_visibility to "//visibility:private", and
16+
# widen visibility as needed with per-target visibility.
17+
package(
18+
default_deprecation = """
19+
These targets are not for public use and will be removed sometime around
20+
2023-03-16. Only use Bazel targets defined in the top-level //BUILD.bazel
21+
file. See https://github.com/googleapis/google-cloud-cpp/issues/3701 for
22+
more details.
23+
""",
24+
default_visibility = ["//visibility:public"],
25+
)
1926

2027
licenses(["notice"]) # Apache 2.0
2128

google/cloud/bigtable/admin/integration_tests/BUILD.bazel

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
package(default_visibility = ["//visibility:public"])
15+
# TODO(#3701) Change the default_visibility to "//visibility:private", and
16+
# widen visibility as needed with per-target visibility.
17+
package(
18+
default_deprecation = """
19+
These targets are not for public use and will be removed sometime around
20+
2023-03-16. Only use Bazel targets defined in the top-level //BUILD.bazel
21+
file. See https://github.com/googleapis/google-cloud-cpp/issues/3701 for
22+
more details.
23+
""",
24+
default_visibility = ["//visibility:public"],
25+
)
1626

1727
licenses(["notice"]) # Apache 2.0
1828

google/cloud/bigtable/benchmarks/BUILD.bazel

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
package(default_visibility = ["//visibility:public"])
15+
# TODO(#3701) Change the default_visibility to "//visibility:private", and
16+
# widen visibility as needed with per-target visibility.
17+
package(
18+
default_deprecation = """
19+
These targets are not for public use and will be removed sometime around
20+
2023-03-16. Only use Bazel targets defined in the top-level //BUILD.bazel
21+
file. See https://github.com/googleapis/google-cloud-cpp/issues/3701 for
22+
more details.
23+
""",
24+
default_visibility = ["//visibility:public"],
25+
)
1626

1727
licenses(["notice"]) # Apache 2.0
1828

google/cloud/bigtable/examples/BUILD.bazel

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
package(default_visibility = ["//visibility:public"])
15+
# TODO(#3701) Change the default_visibility to "//visibility:private", and
16+
# widen visibility as needed with per-target visibility.
17+
package(
18+
default_deprecation = """
19+
These targets are not for public use and will be removed sometime around
20+
2023-03-16. Only use Bazel targets defined in the top-level //BUILD.bazel
21+
file. See https://github.com/googleapis/google-cloud-cpp/issues/3701 for
22+
more details.
23+
""",
24+
default_visibility = ["//visibility:public"],
25+
)
1626

1727
licenses(["notice"]) # Apache 2.0
1828

google/cloud/bigtable/tests/BUILD.bazel

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
package(default_visibility = ["//visibility:public"])
15+
# TODO(#3701) Change the default_visibility to "//visibility:private", and
16+
# widen visibility as needed with per-target visibility.
17+
package(
18+
default_deprecation = """
19+
These targets are not for public use and will be removed sometime around
20+
2023-03-16. Only use Bazel targets defined in the top-level //BUILD.bazel
21+
file. See https://github.com/googleapis/google-cloud-cpp/issues/3701 for
22+
more details.
23+
""",
24+
default_visibility = ["//visibility:public"],
25+
)
1626

1727
licenses(["notice"]) # Apache 2.0
1828

google/cloud/examples/BUILD.bazel

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
package(default_visibility = ["//visibility:public"])
15+
# TODO(#3701) Change the default_visibility to "//visibility:private", and
16+
# widen visibility as needed with per-target visibility.
17+
package(
18+
default_deprecation = """
19+
These targets are not for public use and will be removed sometime around
20+
2023-03-16. Only use Bazel targets defined in the top-level //BUILD.bazel
21+
file. See https://github.com/googleapis/google-cloud-cpp/issues/3701 for
22+
more details.
23+
""",
24+
default_visibility = ["//visibility:public"],
25+
)
1626

1727
licenses(["notice"]) # Apache 2.0
1828

google/cloud/iam/samples/BUILD.bazel

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,17 @@
1414

1515
"""Examples for the Cloud IAM C++ client library."""
1616

17-
package(default_visibility = ["//visibility:public"])
17+
# TODO(#3701) Change the default_visibility to "//visibility:private", and
18+
# widen visibility as needed with per-target visibility.
19+
package(
20+
default_deprecation = """
21+
These targets are not for public use and will be removed sometime around
22+
2023-03-16. Only use Bazel targets defined in the top-level //BUILD.bazel
23+
file. See https://github.com/googleapis/google-cloud-cpp/issues/3701 for
24+
more details.
25+
""",
26+
default_visibility = ["//visibility:public"],
27+
)
1828

1929
licenses(["notice"]) # Apache 2.0
2030

0 commit comments

Comments
 (0)