Closed kalilsn closed 6 years ago
@kalilsn What does the output of protoc --version
say?
libprotoc 3.6.0
OK, I have libprotoc 3.4.0
, and I can't reproduce this bug.
I'll try upgrading my protoc and c what happens.
I pushed up a branch with the bad code: https://github.com/adhocteam/soapbox/tree/kalilsn/update-dependencies
I've noticed now that github.com/golang/protobuf wasn't updated to a newer revision (https://github.com/adhocteam/soapbox/blob/kalilsn/update-dependencies/Gopkg.lock#L60). I can't really tell from the lockfile where this dependency comes from, although I would have assumed it was grpc
, since the only other dependency in our Gopkg.toml is pq
. Perhaps I'm updating the dependencies incorrectly? I ran dep ensure -update google.golang.org/grpc
.
I added the dependency to google.golang.org/grpc, because that package is needed to generate the Go code from protobufs for gRPC. I don't think we should update the version unless there is a compelling reason. Have you tried setting it back to the original version, re-ensure'ing via dep, and re-compiling from there?
I agree, I was only updating those dependencies because that issue suggested that some kind of mismatch might cause this. The original compilation error I posted was on the master branch after running dep ensure
and then make protobufs
. I just checked it out again to confirm.
Ah, I think I understand what's up. Stand by.
@kalilsn If you blow away your soapbox
dir and do a clean git clone and make all
on master, does it succeed?
make all
succeeds, but if I run make protobufs
first, then it fails in the same way.
@orenfromberg managed to get it to build by updating grpc, adding an explicit dependency on github.com/golang/protobuf, and making a small change to a line in soapboxd/deployment.go
https://github.com/adhocteam/soapbox/compare/oren/protoc-fix
@paulsmith are you ok with updating grpc in this case?
@kalilsn OK, I tried Oren's branch and it worked for me. I suspect that the drift in github.com/golang/protobuf is the root cause here, so ordinarily I would prefer that we lock to the version that worked before, but I'm okay with rolling forward on grpc version in interest of moving on.
Fixed by #168
When I attempt to generate the go protobuf code, I end up with code that won't compile:
https://github.com/grpc/grpc-go/issues/2095 suggested that it was due to a version mismatch, but after updating all of the protobuf dependencies (including the project local grpc with
dep
), I get the exact same code and compilation errors.