You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of protobuf and what language are you using?
protoc --version: libprotoc 3.9.0
Language: Golang, version: go1.12.7 linux/amd64 What operating system (Linux, Windows, ...) and version?
Linux: Ubuntu 18.04.2 LTS (Bionic Beaver), 4.18.0-25-generic What runtime / compiler are you using (e.g., python version or gcc version)
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) What did you do?
Steps to reproduce the behavior:
I followed the instructions given at https://grpc.io/docs/quickstart/go/
Directly quoting them here step by step.
Install go version 1.6 or higher. The version installed in my PC is go1.12.7 linux/amd64
Install GRPC using the command go get -u google.golang.org/grpc
Install protoc compiler using the pre-compiled binaries from the link. Chose protoc-3.9.0-linux-x86-arch_64.zip package, extracted it and added the binary's path to PATH variable.
install the protoc plugin for Go using the command go get -u github.com/golang/protobuf/protoc-gen-go The compiler plugin, protoc-gen-go, will be installed in $GOBIN, defaulting to $GOPATH/bin. It must be in your $PATH for the protocol compiler, protoc, to find it.
Check the proto version using the command protoc --version. The output in my PC was libprotoc 3.9.0
Create a simple .proto file with the following content
Run the command protoc --go_out=. firstfile.proto to generate the .pb.go file. The .pb.go file has the below compile time assertion in it that says if the compilation fails at this line, proto package needs to be updated.
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
Compile the .pb.go file with another project (docker for example) and notice the following compilation error. undefined: proto.ProtoPackageIsVersion3 What did you expect to see
No compilation error. Why is there a need to update the proto version when the version 3.9.0 was installed already (as confirmed in point 5 above). Also, the protoc plugin for Go was installed using the command go get -u github.com/golang/protobuf/protoc-gen-go that should have also installed the latest plugin in place. What did you see instead? undefined: proto.ProtoPackageIsVersion3
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
The text was updated successfully, but these errors were encountered:
What version of protobuf and what language are you using?
protoc --version: libprotoc 3.9.0
Language: Golang, version: go1.12.7 linux/amd64
What operating system (Linux, Windows, ...) and version?
Linux: Ubuntu 18.04.2 LTS (Bionic Beaver), 4.18.0-25-generic
What runtime / compiler are you using (e.g., python version or gcc version)
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
What did you do?
Steps to reproduce the behavior:
I followed the instructions given at https://grpc.io/docs/quickstart/go/
Directly quoting them here step by step.
undefined: proto.ProtoPackageIsVersion3
What did you expect to see
No compilation error. Why is there a need to update the proto version when the version 3.9.0 was installed already (as confirmed in point 5 above). Also, the protoc plugin for Go was installed using the command go get -u github.com/golang/protobuf/protoc-gen-go that should have also installed the latest plugin in place.
What did you see instead?
undefined: proto.ProtoPackageIsVersion3
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
The text was updated successfully, but these errors were encountered: