Closed AyushG3112 closed 4 years ago
As a note, using protoc --go_out=plugins=grpc:. /path/to/file.proto.proto
works fine.
This is working as intended. The grpc codegen plugin (--go-grpc_out
) only generates grpc code. The golang protobuf codegen (--go_out
) generates the messages.
@menghanl Does that mean I'll need both protoc-gen-go
and protoc-gen-go-grpc
to generate my gRPC service definitions, and that protoc-gen-go
is only deprecating the support for gRPC plugin and not messages?
Yes.
Please see the FAQ in our main README.md, then answer the questions below before submitting your issue.
protoc
version?3.7.1
go.mod
contents?What version of gRPC are you using?
google.golang.org/grpc v1.30.0 // indirect
What version of Go are you using (
go version
)?go version go1.14 linux/amd64
What operating system (Linux, Windows, …) and version?
Ubuntu 18.04
What did you do?
For a sample proto file
Run
protoc --go-grpc_out=pbs /path/to/file.proto
I get the following generated file.
What did you expect to see?
The generated file should declare of
GetBookRequest
andBook
What did you see instead?
Declarations of
GetBookRequest
andBook
are missing