This issue is now resolved after consulting https://github.com/golang/protobuf/issues/763
On Tuesday, August 6, 2019 at 1:20:14 PM UTC+2, Niket Agrawal wrote: > > Hello, > > I'm following the instructions given here > https://grpc.io/docs/quickstart/go/ to get started with GRPC in Go. > > To install the Protocol Buffers v3, it is mentioned in the above link that > the pre-compiled binaries for your platform can be downloaded, extracted > and added to the PATH. I picked the protoc-3.9.0-linux-x86-arch_64.zip. > Following this I installed the protoc plugin for Go using the command go > get -u github.com/golang/protobuf/protoc-gen-go > > Output of the protoc --version : libprotoc 3.9.0 > > In my .proto file I specify the syntax as proto3 and then compile it to > generate the .pb.go file which has a below compile time assertion in it. > > // 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 > > When I use the .pb.go file in another project the compilation fails > pointing to this very same error so proto package needs to be updated. But, > I don't understand why is an update needed when already the latest version > is installed? > > Could someone please clarify this problem? > > Regards, > Niket > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/4651a8a7-6093-4bb5-be61-1abe33b8f073%40googlegroups.com.
