google-cloud-cpp icon indicating copy to clipboard operation
google-cloud-cpp copied to clipboard

Clean up deprecated RPCs

Open dbolduc opened this issue 1 year ago • 2 comments

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

  • omitted_rpcs
  • emitted_rpcs

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:

  • a @deprecated ... doxygen comment
  • a GOOGLE_CLOUD_CPP_DEPRECATED tag (which expands to [[ deprecated ]]

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.

dbolduc avatar Jun 20 '24 19:06 dbolduc

  • 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.

coryan avatar Jun 20 '24 19:06 coryan

  • 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 avatar Jun 20 '24 19:06 dbolduc

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

dbolduc avatar Jul 02 '24 16:07 dbolduc