googleapis / google-cloud-cpp

C++ Client Libraries for Google Cloud Services
https://cloud.google.com/
Apache License 2.0
530 stars 353 forks source link

Clean up deprecated RPCs #14353

Open dbolduc opened 1 week ago

dbolduc commented 1 week ago

By default, the generator ignores deprecated RPCs. We decided that there was no need to generate an API for a deprecated RPC when we were playing catch up. (By catch up I mean: 100 GCP services existed before the C++ microgenerator was written. Now we have a microgenerator and have a C++ client library for basically every GCP service).

Now when the generator encounters a deprecated RPC, it ensures that it is listed in either

Tasks

  1. Mark our APIs for deprecated RPCs as deprecated.

We should do our part to inform customers to stop using these APIs. That looks like:

I do not think any of our builds will fail due to us using these APIs... but it is a possible complication.

  1. Remove emitted_rpcs and emit the deprecated RPC by default

There really is no use for emitted_rpcs now that we are no longer playing catch up. I think we can assume that any newly deprecated RPC has already been generated. Therefore we need to emit it.

Note that we will not start generating any new RPCs. All the old stuff has already been tagged as omitted_rpcs.

coryan commented 1 week ago
  • a GOOGLE_CLOUD_CPP_DEPRECATED tag (which expands to [[ deprecated ]]

Since C++14 is the minimum version, we do not really need GOOGLE_CLOUD_CPP_DEPRECATED. Just saying.

dbolduc commented 1 week ago
  • a GOOGLE_CLOUD_CPP_DEPRECATED tag (which expands to [[ deprecated ]]

Since C++14 is the minimum version, we do not really need GOOGLE_CLOUD_CPP_DEPRECATED. Just saying.

No. We still need it to support GOOGLE_CLOUD_CPP_DISABLE_DEPRECATION_WARNINGS

https://github.com/googleapis/google-cloud-cpp/blob/8abbf37d00e91e95c6435f46239cca9f778d4e24/google/cloud/internal/attributes.h#L32-L38

dbolduc commented 20 hours ago

Previous discussion in: https://github.com/googleapis/google-cloud-cpp/issues/8486