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

Use protoc-gen-go-grpc for gRPC compilers #3022

Closed
tigersoldier opened this issue Dec 6, 2021 · 2 comments · Fixed by #3761
Closed

Use protoc-gen-go-grpc for gRPC compilers #3022

tigersoldier opened this issue Dec 6, 2021 · 2 comments · Fixed by #3761

Comments

@tigersoldier
Copy link

tigersoldier commented Dec 6, 2021

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 = ...

@tigersoldier tigersoldier changed the title Use grpc-go for gRPC compilers Use protoc-gen-go-grpc for gRPC compilers Dec 6, 2021
@robfig
Copy link
Contributor

robfig commented Dec 9, 2021

Thank you for reporting this. If you're interested and have the bandwidth to contribute that change, I'd be happy to merge it.

@sessfeld
Copy link

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?

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 a pull request may close this issue.

3 participants