Closed tigersoldier closed 10 months ago
Thank you for reporting this. If you're interested and have the bandwidth to contribute that change, I'd be happy to merge it.
I'd like to open this back up again. I send a PR, but I believe it'd also require a change to Gazelle. How would we coordinate that between the repos?
The generated gRPC code is different from the result of the protoc-gen-go-grpc plugin. By reading the rule definition, it seems that rules_go is using the deprecated grpc mode mode in proto-gen-go.
Currently I'm working around it with creating my own rule for the grpc-go proto compiler, but the official bazel rules should provide it.
What version of rules_go are you using?
0.29.0
What version of gazelle are you using?
0.24.0
What version of Bazel are you using?
4.2.1-homebrew
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
MacOS 12.0.1 Montery
Any other potentially useful information about your toolchain?
N/A
What did you do?
bazel build
a proto with service defined and compiler using@io_bazel_rules_go//proto:go_grpc
What did you expect to see?
The generated code should have
var <ServiceName>_ServiceDesc = ...
What did you see instead?
The generated code has
var _<ServiceName>_ServiceDesc = ...