Skip to content

Commit

Permalink
cleanup: remove deprecated targets and rules (#8413)
Browse files Browse the repository at this point in the history
And the CI scripts used to test them.
  • Loading branch information
coryan committed Feb 23, 2022
1 parent 63478e2 commit df6fa36
Show file tree
Hide file tree
Showing 27 changed files with 41 additions and 609 deletions.
36 changes: 0 additions & 36 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,6 @@ cc_library(
],
)

cc_library(
name = "bigtable_client",
deprecation = "this target will be removed on or around 2022-02-15, please use //:bigtable instead.",
tags = ["manual"],
deps = [
"//google/cloud/bigtable:bigtable_client_internal",
],
)

cc_library(
name = "iam",
deps = [
Expand Down Expand Up @@ -225,15 +216,6 @@ cc_library(
],
)

cc_library(
name = "pubsub_client",
deprecation = "this target will be removed on or around 2022-02-15, please use //:pubsub instead.",
tags = ["manual"],
deps = [
"//google/cloud/pubsub:google_cloud_cpp_pubsub",
],
)

cc_library(
name = "spanner",
deps = [
Expand All @@ -248,15 +230,6 @@ cc_library(
],
)

cc_library(
name = "spanner_client",
deprecation = "this target will be removed on or around 2022-02-15, please use //:spanner instead.",
tags = ["manual"],
deps = [
"//google/cloud/spanner:google_cloud_cpp_spanner",
],
)

cc_library(
name = "storage",
deps = [
Expand All @@ -271,12 +244,3 @@ cc_library(
"//google/cloud/storage:google_cloud_cpp_storage_grpc",
],
)

cc_library(
name = "storage_client",
deprecation = "this target will be removed on or around 2022-02-15, please use //:storage instead.",
tags = ["manual"],
deps = [
"//google/cloud/storage:google_cloud_cpp_storage",
],
)
64 changes: 29 additions & 35 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,6 @@

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

<details>
<summary>2022-02-15: retiring legacy targets and rules</summary>
<br>

* In 2022-02-15 (or around that time) we are planning to remove a number of
backwards compatibility targets names for Bazel and CMake. Specifically:
- **Bazel Users:** applications should use the targets at the top-level
directory, e.g. `//:bigtable`, or `//:pubsub`.
- All other Bazel targets will be marked as package private in or around
2022-02-15.
- **CMake Users:** applications should use the
`google-cloud-cpp::*` targets (e.g. `google-cloud-cpp::pubsub`).
- The legacy CMake targets generate warnings if using CMake >= 3.18 (the
earliest version that supports deprecation warnings).
- All exported targets without a `google-cloud-cpp::` prefix will be
retired in or around 2022-02-15. These include, but are not limited to:
- Any target starting with `googleapis-c++::`
- Any exported targets without a prefix, including:
`google_cloud_cpp_common`, `google_cloud_cpp_grpc_utils`,
`bigtable_client`, `bigtable_protos`, `firestore_client`,
`pubsub_client`, `storage_client`, `spanner_client`.
- Some target aliases, including `bigtable::client`, `bigtable::protos`,
`firestore::client`
- **pkg-config users:** applications should use the modules starting with
`google_cloud_cpp`
- All other modules will be retired in or around 2022-02-15
- **Direct users of -l${library} flags:** we do not recommend that
applications uses `-l` flags directly, please use `pkg-config` and/or
the target names under CMake or Bazel. We make this recommendation because
we do not know of any mechanism to provide backwards compatibility for such
flags.
- If you have any feedback about this change please add comments in
[#5726](https://github.com/googleapis/google-cloud-cpp/issues/5726)
</details>

<details>
<summary>2022-04-01: retiring legacy IAM functions</summary>
<br>
Expand Down Expand Up @@ -103,6 +68,35 @@ https://github.com/googleapis/google-cloud-cpp/issues/8234.

## v1.37.0 - TBD

**BREAKING CHANGES**

* As previously announced, we are removing certain legacy CMake targets and
Bazel rules in this release.
- **Bazel Users:** applications should use the targets at the top-level
directory, e.g. `//:bigtable`, or `//:pubsub`. Targets in each directory
(e.g. `//google/cloud/bigtable:bigtable_client`) are now retired or marked
private.
- **CMake Users:** applications should use the
`google-cloud-cpp::*` targets (e.g. `google-cloud-cpp::pubsub`).
- All exported targets without a `google-cloud-cpp::` prefix are retired.
These include, but are not limited to:
- Any target starting with `googleapis-c++::`
- Any exported targets without a prefix, including:
`google_cloud_cpp_common`, `google_cloud_cpp_grpc_utils`,
`bigtable_client`, `bigtable_protos`, `firestore_client`,
`pubsub_client`, `storage_client`, `spanner_client`.
- Some target aliases, including `bigtable::client`, `bigtable::protos`
- **pkg-config users:** applications should use the modules starting with
`google_cloud_cpp`. All other modules are now retired.
- **Direct users of -l${library} flags:** we do not recommend that
applications uses `-l` flags directly, please use `pkg-config` and/or
the target names under CMake or Bazel. We make this recommendation because
we do not know of any mechanism to provide backwards compatibility for such
flags.
- More details about the rationale for these changes in [#5726].

[#5726]: https://github.com/googleapis/google-cloud-cpp/issues/5726

### [BigQuery](https://github.com/googleapis/google-cloud-cpp/blob/main/google/cloud/bigquery/README.md)

The library has been expanded to include the following services:
Expand Down
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,6 @@ use, e.g.,`//:spanner`. Experimental rules have `experimental` in their name,
e.g. `//:experimental-logging`. As previously stated, experimental rules are
subject to change or removal without notice.
Previously some of the rules in subdirectories
(e.g. `//google/cloud/bigtable:bigtable_client`) had public visibility. These
rules are deprecated as of 2021-02-15, and will be become inaccessible
(or removed) on or shortly after **2022-02-15**.
### CMake targets and packages
Only CMake packages starting with the `google_cloud_cpp_` prefix are intended
Expand All @@ -270,19 +265,10 @@ for customer use. Experimental targets have `experimental` in their name (e.g.
`google-cloud-cpp::experimental-logging`). As previously stated, experimental
targets are subject to change or removal without notice.
In previous versions we released packages with other prefixes (or without
specific prefixes), these are deprecated as of 2021-02-15, and will be retired
on or shortly after **2022-02-15**. Same applies to any targets exported with
other prefixes (or without an specific prefix).
### pkg-config modules
Only modules starting with `google_cloud_cpp_` are intended for customer use.
In previous versions we released modules with other prefixes (or without
specific prefixes), these are deprecated as of 2021-02-15, and will be retired
on or shortly after **2022-02-15**.
### Unsupported use cases
We try to provide stable names for the previously described mechanisms:
Expand Down
21 changes: 7 additions & 14 deletions ci/cloudbuild/builds/cmake-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ expected_dirs+=(
./include/google/type
./include/grafeas
./include/grafeas/v1
./lib64/cmake/bigtable_client
./lib64/cmake/google_cloud_cpp_bigtable
./lib64/cmake/google_cloud_cpp_common
./lib64/cmake/google_cloud_cpp_googleapis
Expand All @@ -120,10 +119,6 @@ expected_dirs+=(
./lib64/cmake/google_cloud_cpp_pubsub
./lib64/cmake/google_cloud_cpp_rest_internal
./lib64/cmake/google_cloud_cpp_spanner
./lib64/cmake/googleapis
./lib64/cmake/pubsub_client
./lib64/cmake/spanner_client
./lib64/cmake/storage_client
./lib64/pkgconfig
)

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

mapfile -t ctest_args < <(ctest::common_args)
for repo_root in "ci/verify_current_targets" "ci/verify_deprecated_targets"; do
out_dir="cmake-out/$(basename "${repo_root}")-out"
rm -f "${out_dir}/CMakeCache.txt"
io::log_h2 "Verifying CMake targets in repo root: ${repo_root}"
cmake --log-level WARNING -GNinja -DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" \
-S "${repo_root}" -B "${out_dir}" -Wno-dev
cmake --build "${out_dir}"
env -C "${out_dir}" ctest "${ctest_args[@]}"
done
out_dir="cmake-out/verify_current_targets-out"
rm -f "${out_dir}/CMakeCache.txt"
io::log_h2 "Verifying CMake targets in repo root: ci/verify_current_targets"
cmake --log-level WARNING -GNinja -DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" \
-S ci/verify_current_targets -B "${out_dir}" -Wno-dev
cmake --build "${out_dir}"
env -C "${out_dir}" ctest "${ctest_args[@]}"

# Tests the installed artifacts by building and running the quickstarts.
# shellcheck disable=SC2046
Expand Down
14 changes: 0 additions & 14 deletions ci/generate-markdown/generate-readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,6 @@ use, e.g.,`//:spanner`. Experimental rules have `experimental` in their name,
e.g. `//:experimental-logging`. As previously stated, experimental rules are
subject to change or removal without notice.
Previously some of the rules in subdirectories
(e.g. `//google/cloud/bigtable:bigtable_client`) had public visibility. These
rules are deprecated as of 2021-02-15, and will be become inaccessible
(or removed) on or shortly after **2022-02-15**.
### CMake targets and packages
Only CMake packages starting with the `google_cloud_cpp_` prefix are intended
Expand All @@ -263,19 +258,10 @@ for customer use. Experimental targets have `experimental` in their name (e.g.
`google-cloud-cpp::experimental-logging`). As previously stated, experimental
targets are subject to change or removal without notice.
In previous versions we released packages with other prefixes (or without
specific prefixes), these are deprecated as of 2021-02-15, and will be retired
on or shortly after **2022-02-15**. Same applies to any targets exported with
other prefixes (or without an specific prefix).
### pkg-config modules
Only modules starting with `google_cloud_cpp_` are intended for customer use.
In previous versions we released modules with other prefixes (or without
specific prefixes), these are deprecated as of 2021-02-15, and will be retired
on or shortly after **2022-02-15**.
### Unsupported use cases
We try to provide stable names for the previously described mechanisms:
Expand Down
1 change: 1 addition & 0 deletions ci/verify_current_targets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ foreach (library ${experimental_libraries})
endforeach ()

foreach (library ${common_libraries} ${ga_libraries} ${experimental_libraries})
message("library=${library}")
pkg_check_modules(${library} IMPORTED_TARGET REQUIRED
google_cloud_cpp_${library})
add_test_case(test_pc_${library} PkgConfig::${library})
Expand Down
8 changes: 0 additions & 8 deletions ci/verify_deprecated_targets/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ licenses(["notice"]) # Apache 2.0
DEPRECATED_TARGETS = [
"google/cloud:google_cloud_cpp_common",
"google/cloud:google_cloud_cpp_grpc_utils",
"google/cloud/bigtable:bigtable_client",
"google/cloud/pubsub:pubsub_client",
"google/cloud/spanner:spanner_client",
"google/cloud/storage:storage_client",
":bigtable_client",
":pubsub_client",
":spanner_client",
":storage_client",
]

[cc_test(
Expand Down
Loading

0 comments on commit df6fa36

Please sign in to comment.