Description
I am hopeful that there is a simple solution to get around this issue :)
A few hours ago, this commit introduced proto.ProtoPackageIsVersion3
and set const generatedCodeVersion = 3
Our CI system (and I suspect many other peoples) do a:
go get github.com/golang/protobuf/protoc-gen-go
as part of setting up the system, and also do a:
go generate ./...
and check to make sure that regenerated files match the files in the commit (basically, checking for regen on updating the .proto files).
This has been going swimmingly until a few hours ago. In trying to debug this problem, I came to realize that the fact this worked at all is a testament to how good you guys are at backward compatibility 👍
What I discovered digging in is that we have been vendoring github.com/golang/protobuf/ v1.2.0 (because of other dependencies we have), but of course go get pulls the latest from master.
v1.2.0 lacks proto.ProtoPackageIsVersion3, so our generated code suddenly doesn't compile.
So I fell back to using:
go install ./vendor/github.com/golang/protobuf/protoc-gen-go/
in our CI. Unfortunately, this seems to result in some generation differences. If I run it locally, push, and then our CI runs it, the generated code doesn't quite match.
I get diffs like:
-var fileDescriptor_networkservice_d4de7ff5f5769d53 = []byte{
+var fileDescriptor_networkservice_5b085879d0d87bdf = []byte{
I don't precisely consider this a bug on your end, you guys are super good about backward compatibility, and at some point you do have to make the change.
Do you have any ideas about how I might navigate all of this? I suspect lots and lots of folks will shortly have similar issues...
Activity