Skip to content

Conversation

@scotthart
Copy link
Member

@scotthart scotthart commented Nov 21, 2024

In a previous PR, the disable_deprecations_warnings.inc was added to services that were deprecated. This PR also adds this include file when the service contains methods that are marked as deprecated. As the disable_deprecations_warnings.inc includes a pragma push, the corresponding pragma pop needed to be added, which this PR adds.

This was tested with both protobuf v28.3 and protobuf v29.0-rc3 and in both cases the [[deprecated]] present in the generated protobuf messages no longer results in a compilation error.


This change is Reviewable

@codecov
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 63.63636% with 24 lines in your changes missing coverage. Please review.

Project coverage is 92.99%. Comparing base (8e7038e) to head (8e219d8).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
generator/internal/service_code_generator.cc 77.77% 4 Missing ⚠️
...nerator/internal/connection_impl_rest_generator.cc 0.00% 2 Missing ⚠️
generator/internal/connection_rest_generator.cc 0.00% 2 Missing ⚠️
...rator/internal/logging_decorator_rest_generator.cc 0.00% 2 Missing ⚠️
...ator/internal/metadata_decorator_rest_generator.cc 0.00% 2 Missing ⚠️
...erator/internal/round_robin_decorator_generator.cc 0.00% 2 Missing ⚠️
generator/internal/stub_factory_rest_generator.cc 0.00% 2 Missing ⚠️
generator/internal/stub_rest_generator.cc 0.00% 2 Missing ⚠️
generator/internal/forwarding_client_generator.cc 0.00% 1 Missing ⚠️
...erator/internal/forwarding_connection_generator.cc 0.00% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14852      +/-   ##
==========================================
- Coverage   93.00%   92.99%   -0.02%     
==========================================
  Files        2351     2351              
  Lines      209479   209543      +64     
==========================================
+ Hits       194818   194856      +38     
- Misses      14661    14687      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_GOLDEN_KITCHEN_SINK_CLIENT_H
#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_GOLDEN_KITCHEN_SINK_CLIENT_H

#include "google/cloud/internal/disable_deprecation_warnings.inc"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, this is not the place to push/pop. We should only push/pop around where we include the protobuf generated code.

Otherwise we are silencing the deprecation warnings for our deprecated client classes. We don't want that. We want customers to see those warnings.

@scotthart scotthart closed this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants