Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply Obsolete attribute to deprecated enums and enum values in C# generated code #10520

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

jskeet
Copy link
Contributor

@jskeet jskeet commented Sep 8, 2022

Fixes #10513

Copy link

@amanda-tarafa amanda-tarafa left a comment

Choose a reason for hiding this comment

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

LGTM

@jskeet jskeet force-pushed the deprecated-enum-value branch from 4213efd to 2254248 Compare September 8, 2022 09:52
@jskeet
Copy link
Contributor Author

jskeet commented Sep 8, 2022

(Rerunning Kokoro to see if that sorts out the failures... I can't see how this change would have induced them.)

@jskeet
Copy link
Contributor Author

jskeet commented Sep 9, 2022

I believe the Kokoro errors are the ones that would be fixed by #10523 - @fowles, are you happy to merge?

@mkruskal-google
Copy link
Member

Yea these should be unrelated and fixed now

@jskeet jskeet force-pushed the deprecated-enum-value branch from 2254248 to 5036705 Compare September 9, 2022 15:24
@jskeet
Copy link
Contributor Author

jskeet commented Sep 9, 2022

Rebased - will see if it goes green...

@jskeet
Copy link
Contributor Author

jskeet commented Sep 9, 2022

Kokoro is green :) @fowles, please merge if you're happy.

@fowles fowles merged commit 9c40a84 into protocolbuffers:main Sep 9, 2022
@jskeet jskeet deleted the deprecated-enum-value branch October 26, 2022 09:40
apolcyn pushed a commit to grpc/grpc that referenced this pull request Apr 26, 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.
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 to grpc/grpc 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deprecate for enum value not adding obsolete to generated c# models
5 participants