Skip to content

Commit df6fa36

Browse files
authored
cleanup: remove deprecated targets and rules (#8413)
And the CI scripts used to test them.
1 parent 63478e2 commit df6fa36

File tree

27 files changed

+41
-609
lines changed

27 files changed

+41
-609
lines changed

BUILD.bazel

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,6 @@ cc_library(
179179
],
180180
)
181181

182-
cc_library(
183-
name = "bigtable_client",
184-
deprecation = "this target will be removed on or around 2022-02-15, please use //:bigtable instead.",
185-
tags = ["manual"],
186-
deps = [
187-
"//google/cloud/bigtable:bigtable_client_internal",
188-
],
189-
)
190-
191182
cc_library(
192183
name = "iam",
193184
deps = [
@@ -225,15 +216,6 @@ cc_library(
225216
],
226217
)
227218

228-
cc_library(
229-
name = "pubsub_client",
230-
deprecation = "this target will be removed on or around 2022-02-15, please use //:pubsub instead.",
231-
tags = ["manual"],
232-
deps = [
233-
"//google/cloud/pubsub:google_cloud_cpp_pubsub",
234-
],
235-
)
236-
237219
cc_library(
238220
name = "spanner",
239221
deps = [
@@ -248,15 +230,6 @@ cc_library(
248230
],
249231
)
250232

251-
cc_library(
252-
name = "spanner_client",
253-
deprecation = "this target will be removed on or around 2022-02-15, please use //:spanner instead.",
254-
tags = ["manual"],
255-
deps = [
256-
"//google/cloud/spanner:google_cloud_cpp_spanner",
257-
],
258-
)
259-
260233
cc_library(
261234
name = "storage",
262235
deps = [
@@ -271,12 +244,3 @@ cc_library(
271244
"//google/cloud/storage:google_cloud_cpp_storage_grpc",
272245
],
273246
)
274-
275-
cc_library(
276-
name = "storage_client",
277-
deprecation = "this target will be removed on or around 2022-02-15, please use //:storage instead.",
278-
tags = ["manual"],
279-
deps = [
280-
"//google/cloud/storage:google_cloud_cpp_storage",
281-
],
282-
)

CHANGELOG.md

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,6 @@
44

55
<!-- Keep these sorted by estimated date -->
66

7-
<details>
8-
<summary>2022-02-15: retiring legacy targets and rules</summary>
9-
<br>
10-
11-
* In 2022-02-15 (or around that time) we are planning to remove a number of
12-
backwards compatibility targets names for Bazel and CMake. Specifically:
13-
- **Bazel Users:** applications should use the targets at the top-level
14-
directory, e.g. `//:bigtable`, or `//:pubsub`.
15-
- All other Bazel targets will be marked as package private in or around
16-
2022-02-15.
17-
- **CMake Users:** applications should use the
18-
`google-cloud-cpp::*` targets (e.g. `google-cloud-cpp::pubsub`).
19-
- The legacy CMake targets generate warnings if using CMake >= 3.18 (the
20-
earliest version that supports deprecation warnings).
21-
- All exported targets without a `google-cloud-cpp::` prefix will be
22-
retired in or around 2022-02-15. These include, but are not limited to:
23-
- Any target starting with `googleapis-c++::`
24-
- Any exported targets without a prefix, including:
25-
`google_cloud_cpp_common`, `google_cloud_cpp_grpc_utils`,
26-
`bigtable_client`, `bigtable_protos`, `firestore_client`,
27-
`pubsub_client`, `storage_client`, `spanner_client`.
28-
- Some target aliases, including `bigtable::client`, `bigtable::protos`,
29-
`firestore::client`
30-
- **pkg-config users:** applications should use the modules starting with
31-
`google_cloud_cpp`
32-
- All other modules will be retired in or around 2022-02-15
33-
- **Direct users of -l${library} flags:** we do not recommend that
34-
applications uses `-l` flags directly, please use `pkg-config` and/or
35-
the target names under CMake or Bazel. We make this recommendation because
36-
we do not know of any mechanism to provide backwards compatibility for such
37-
flags.
38-
- If you have any feedback about this change please add comments in
39-
[#5726](https://github.com/googleapis/google-cloud-cpp/issues/5726)
40-
</details>
41-
427
<details>
438
<summary>2022-04-01: retiring legacy IAM functions</summary>
449
<br>
@@ -103,6 +68,35 @@ https://github.com/googleapis/google-cloud-cpp/issues/8234.
10368

10469
## v1.37.0 - TBD
10570

71+
**BREAKING CHANGES**
72+
73+
* As previously announced, we are removing certain legacy CMake targets and
74+
Bazel rules in this release.
75+
- **Bazel Users:** applications should use the targets at the top-level
76+
directory, e.g. `//:bigtable`, or `//:pubsub`. Targets in each directory
77+
(e.g. `//google/cloud/bigtable:bigtable_client`) are now retired or marked
78+
private.
79+
- **CMake Users:** applications should use the
80+
`google-cloud-cpp::*` targets (e.g. `google-cloud-cpp::pubsub`).
81+
- All exported targets without a `google-cloud-cpp::` prefix are retired.
82+
These include, but are not limited to:
83+
- Any target starting with `googleapis-c++::`
84+
- Any exported targets without a prefix, including:
85+
`google_cloud_cpp_common`, `google_cloud_cpp_grpc_utils`,
86+
`bigtable_client`, `bigtable_protos`, `firestore_client`,
87+
`pubsub_client`, `storage_client`, `spanner_client`.
88+
- Some target aliases, including `bigtable::client`, `bigtable::protos`
89+
- **pkg-config users:** applications should use the modules starting with
90+
`google_cloud_cpp`. All other modules are now retired.
91+
- **Direct users of -l${library} flags:** we do not recommend that
92+
applications uses `-l` flags directly, please use `pkg-config` and/or
93+
the target names under CMake or Bazel. We make this recommendation because
94+
we do not know of any mechanism to provide backwards compatibility for such
95+
flags.
96+
- More details about the rationale for these changes in [#5726].
97+
98+
[#5726]: https://github.com/googleapis/google-cloud-cpp/issues/5726
99+
106100
### [BigQuery](https://github.com/googleapis/google-cloud-cpp/blob/main/google/cloud/bigquery/README.md)
107101

108102
The library has been expanded to include the following services:

README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,6 @@ use, e.g.,`//:spanner`. Experimental rules have `experimental` in their name,
257257
e.g. `//:experimental-logging`. As previously stated, experimental rules are
258258
subject to change or removal without notice.
259259
260-
Previously some of the rules in subdirectories
261-
(e.g. `//google/cloud/bigtable:bigtable_client`) had public visibility. These
262-
rules are deprecated as of 2021-02-15, and will be become inaccessible
263-
(or removed) on or shortly after **2022-02-15**.
264-
265260
### CMake targets and packages
266261
267262
Only CMake packages starting with the `google_cloud_cpp_` prefix are intended
@@ -270,19 +265,10 @@ for customer use. Experimental targets have `experimental` in their name (e.g.
270265
`google-cloud-cpp::experimental-logging`). As previously stated, experimental
271266
targets are subject to change or removal without notice.
272267
273-
In previous versions we released packages with other prefixes (or without
274-
specific prefixes), these are deprecated as of 2021-02-15, and will be retired
275-
on or shortly after **2022-02-15**. Same applies to any targets exported with
276-
other prefixes (or without an specific prefix).
277-
278268
### pkg-config modules
279269
280270
Only modules starting with `google_cloud_cpp_` are intended for customer use.
281271
282-
In previous versions we released modules with other prefixes (or without
283-
specific prefixes), these are deprecated as of 2021-02-15, and will be retired
284-
on or shortly after **2022-02-15**.
285-
286272
### Unsupported use cases
287273
288274
We try to provide stable names for the previously described mechanisms:

ci/cloudbuild/builds/cmake-install.sh

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ expected_dirs+=(
111111
./include/google/type
112112
./include/grafeas
113113
./include/grafeas/v1
114-
./lib64/cmake/bigtable_client
115114
./lib64/cmake/google_cloud_cpp_bigtable
116115
./lib64/cmake/google_cloud_cpp_common
117116
./lib64/cmake/google_cloud_cpp_googleapis
@@ -120,10 +119,6 @@ expected_dirs+=(
120119
./lib64/cmake/google_cloud_cpp_pubsub
121120
./lib64/cmake/google_cloud_cpp_rest_internal
122121
./lib64/cmake/google_cloud_cpp_spanner
123-
./lib64/cmake/googleapis
124-
./lib64/cmake/pubsub_client
125-
./lib64/cmake/spanner_client
126-
./lib64/cmake/storage_client
127122
./lib64/pkgconfig
128123
)
129124

@@ -165,15 +160,13 @@ while IFS= read -r -d '' f; do
165160
done < <(find "${INSTALL_PREFIX}" -type f -print0)
166161

167162
mapfile -t ctest_args < <(ctest::common_args)
168-
for repo_root in "ci/verify_current_targets" "ci/verify_deprecated_targets"; do
169-
out_dir="cmake-out/$(basename "${repo_root}")-out"
170-
rm -f "${out_dir}/CMakeCache.txt"
171-
io::log_h2 "Verifying CMake targets in repo root: ${repo_root}"
172-
cmake --log-level WARNING -GNinja -DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" \
173-
-S "${repo_root}" -B "${out_dir}" -Wno-dev
174-
cmake --build "${out_dir}"
175-
env -C "${out_dir}" ctest "${ctest_args[@]}"
176-
done
163+
out_dir="cmake-out/verify_current_targets-out"
164+
rm -f "${out_dir}/CMakeCache.txt"
165+
io::log_h2 "Verifying CMake targets in repo root: ci/verify_current_targets"
166+
cmake --log-level WARNING -GNinja -DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" \
167+
-S ci/verify_current_targets -B "${out_dir}" -Wno-dev
168+
cmake --build "${out_dir}"
169+
env -C "${out_dir}" ctest "${ctest_args[@]}"
177170

178171
# Tests the installed artifacts by building and running the quickstarts.
179172
# shellcheck disable=SC2046

ci/generate-markdown/generate-readme.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,6 @@ use, e.g.,`//:spanner`. Experimental rules have `experimental` in their name,
250250
e.g. `//:experimental-logging`. As previously stated, experimental rules are
251251
subject to change or removal without notice.
252252
253-
Previously some of the rules in subdirectories
254-
(e.g. `//google/cloud/bigtable:bigtable_client`) had public visibility. These
255-
rules are deprecated as of 2021-02-15, and will be become inaccessible
256-
(or removed) on or shortly after **2022-02-15**.
257-
258253
### CMake targets and packages
259254
260255
Only CMake packages starting with the `google_cloud_cpp_` prefix are intended
@@ -263,19 +258,10 @@ for customer use. Experimental targets have `experimental` in their name (e.g.
263258
`google-cloud-cpp::experimental-logging`). As previously stated, experimental
264259
targets are subject to change or removal without notice.
265260
266-
In previous versions we released packages with other prefixes (or without
267-
specific prefixes), these are deprecated as of 2021-02-15, and will be retired
268-
on or shortly after **2022-02-15**. Same applies to any targets exported with
269-
other prefixes (or without an specific prefix).
270-
271261
### pkg-config modules
272262
273263
Only modules starting with `google_cloud_cpp_` are intended for customer use.
274264
275-
In previous versions we released modules with other prefixes (or without
276-
specific prefixes), these are deprecated as of 2021-02-15, and will be retired
277-
on or shortly after **2022-02-15**.
278-
279265
### Unsupported use cases
280266
281267
We try to provide stable names for the previously described mechanisms:

ci/verify_current_targets/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ foreach (library ${experimental_libraries})
6060
endforeach ()
6161

6262
foreach (library ${common_libraries} ${ga_libraries} ${experimental_libraries})
63+
message("library=${library}")
6364
pkg_check_modules(${library} IMPORTED_TARGET REQUIRED
6465
google_cloud_cpp_${library})
6566
add_test_case(test_pc_${library} PkgConfig::${library})

ci/verify_deprecated_targets/BUILD.bazel

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ licenses(["notice"]) # Apache 2.0
2424
DEPRECATED_TARGETS = [
2525
"google/cloud:google_cloud_cpp_common",
2626
"google/cloud:google_cloud_cpp_grpc_utils",
27-
"google/cloud/bigtable:bigtable_client",
28-
"google/cloud/pubsub:pubsub_client",
29-
"google/cloud/spanner:spanner_client",
30-
"google/cloud/storage:storage_client",
31-
":bigtable_client",
32-
":pubsub_client",
33-
":spanner_client",
34-
":storage_client",
3527
]
3628

3729
[cc_test(

0 commit comments

Comments
 (0)