TL DR: Maybe, but it does not generate a compiler warning. Consider using field level deviation.
It seems that you can add an obsolete option to the service, as in the message and listing like:
service MyService {
rpc GetThings(GetThingsRequest) returns (GetThingsResponse) {
option deprecated = true;
};
}
This is discovered at: https://github.com/google/protobuf/issues/1734
, , , , . Java, HelloWorld Java . java , HelloWorldProto.java, , @Deprecated java, , , - -:
$ diff HelloWorldProto-{control,method}.java
38c38
< "ssage\030\001 \001(\t2I\n\007Greeter\022>\n\010SayHello\022\030.hel" +
---
> "ssage\030\001 \001(\t2L\n\007Greeter\022A\n\010SayHello\022\030.hel" +
40,41c40,41
< "eply\"\000B6\n\033io.grpc.examples.helloworldB\017H" +
< "elloWorldProtoP\001\242\002\003HLWb\006proto3"
---
> "eply\"\003\210\002\001B6\n\033io.grpc.examples.helloworld" +
> "B\017HelloWorldProtoP\001\242\002\003HLWb\006proto3"
, . , java-. , , :
$ ./gradlew installDist
...
Note: Some input files use or override a deprecated API.
...
, :