[csharp proto plugin] Apply Obsolete attribute to deprecated services and methods in C# generated code#32414
Merged
apolcyn merged 5 commits intogrpc:masterfrom Apr 26, 2023
Conversation
Contributor
Author
|
Added pragma to disable obsolete warnings in the generated code (added disabling warning 0612) after discussions in #28597 (comment) |
Contributor
|
I just merged #32734, so please consider providing a codegen bazel test. |
Contributor
Author
|
@jtattermusch I've added bazel tests. |
apolcyn
approved these changes
Apr 26, 2023
XuanWang-Amos
pushed a commit
to XuanWang-Amos/grpc
that referenced
this pull request
May 1, 2023
… and methods in C# generated code (grpc#32414) Apply Obsolete attribute to deprecated services and methods in C# generated code Fix for grpc#28597 - Deprecated support for enums and enum values is already fixed by protocolbuffers/protobuf#10520 but this is not yet released. It is fixed in Protocol Buffers v22.0-rc1 but the gRPC repo currently has 21.12 as the protocol buffers submodule. - Deprecated support for messages and fields already exists in the protocol buffers compiler. The fix in this PR adds `Obsolete` attribute to classes and methods for deprecated services and methods within services. e.g. ``` service Greeter { option deprecated=true; // service level deprecated // Sends a greeting rpc SayHello (HelloRequest) returns (HelloReply) { option deprecated=true; // method level deprecated } } ``` I couldn't find any protocol buffers plugin tests to update. Tested locally.
paulosjca
pushed a commit
to paulosjca/grpc
that referenced
this pull request
May 4, 2023
… and methods in C# generated code (grpc#32414) Apply Obsolete attribute to deprecated services and methods in C# generated code Fix for grpc#28597 - Deprecated support for enums and enum values is already fixed by protocolbuffers/protobuf#10520 but this is not yet released. It is fixed in Protocol Buffers v22.0-rc1 but the gRPC repo currently has 21.12 as the protocol buffers submodule. - Deprecated support for messages and fields already exists in the protocol buffers compiler. The fix in this PR adds `Obsolete` attribute to classes and methods for deprecated services and methods within services. e.g. ``` service Greeter { option deprecated=true; // service level deprecated // Sends a greeting rpc SayHello (HelloRequest) returns (HelloReply) { option deprecated=true; // method level deprecated } } ``` I couldn't find any protocol buffers plugin tests to update. Tested locally.
wanlin31
pushed a commit
that referenced
this pull request
May 18, 2023
… and methods in C# generated code (#32414) Apply Obsolete attribute to deprecated services and methods in C# generated code Fix for #28597 - Deprecated support for enums and enum values is already fixed by protocolbuffers/protobuf#10520 but this is not yet released. It is fixed in Protocol Buffers v22.0-rc1 but the gRPC repo currently has 21.12 as the protocol buffers submodule. - Deprecated support for messages and fields already exists in the protocol buffers compiler. The fix in this PR adds `Obsolete` attribute to classes and methods for deprecated services and methods within services. e.g. ``` service Greeter { option deprecated=true; // service level deprecated // Sends a greeting rpc SayHello (HelloRequest) returns (HelloReply) { option deprecated=true; // method level deprecated } } ``` I couldn't find any protocol buffers plugin tests to update. Tested locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apply Obsolete attribute to deprecated services and methods in C# generated code
Fix for #28597
Deprecated support for enums and enum values is already fixed by Apply Obsolete attribute to deprecated enums and enum values in C# generated code protocolbuffers/protobuf#10520 but this is not yet released. It is fixed in Protocol Buffers v22.0-rc1 but the gRPC repo currently has 21.12 as the protocol buffers submodule.
Deprecated support for messages and fields already exists in the protocol buffers compiler.
The fix in this PR adds
Obsoleteattribute to classes and methods for deprecated services and methods within services. e.g.I couldn't find any protocol buffers plugin tests to update. Tested locally.