Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker file pulls github.com/golang/protobuf/proto-gen-go from master and not a tag/release #109

Closed
BradErz opened this issue Feb 13, 2019 · 5 comments

Comments

@BradErz
Copy link

BradErz commented Feb 13, 2019

Currently the docker image pulls the github.com/golang/protobuf/protoc-gen-go from master:
https://github.com/namely/docker-protoc/blob/master/Dockerfile#L42

Doing this with the latest released version of protoc 3.6.1 causes:

vendor/github.com/faceit/protos-generated/push-service/v1.0.0/go/push-service.pb.go:23:11: undefined: proto.ProtoPackageIsVersion3

The issue was discussed here is quite some detail:
golang/protobuf#763

Is anyone getting arround this right now? Im about to open a PR to fix it otherwise. Following the install instructions in the README of https://github.com/golang/protobuf#installation

@BradErz BradErz changed the title golang/protobuf/proto-gen-go pulls form master and not a tag/release docker file pulls github.com/golang/protobuf/proto-gen-go from master and not a tag/release Feb 13, 2019
@mhamrah
Copy link
Contributor

mhamrah commented Feb 13, 2019

we got around this by bumping our various protobuf packages in our go projects to match

@BradErz
Copy link
Author

BradErz commented Feb 13, 2019

Thanks for the response @mhamrah

So your go projects also pull from the master of golang/protobuf? (i tried this and it works, but it feels super sketchy to have to do that)

I tried to pin the version of protoc-gen-go in the docker image

RUN go get -d -u github.com/golang/protobuf/protoc-gen-go \
    && git -C "$(go env GOPATH)"/src/github.com/golang/protobuf checkout v${golang_protobuf_version} \
    && go install github.com/golang/protobuf/protoc-gen-go

However:

RUN go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc

Then fails to install because it depends on protoc-gen-go and that branch is in a detached head state. I tried also to check back out the master branch of protoc-gen-go but then when the protoc-gen-doc is installed it overwrites the version of protoc-gen-go with the one of master again 🙄

@mhamrah
Copy link
Contributor

mhamrah commented Feb 13, 2019

We use go modules, and bumped to the latest.

@ido-namely
Copy link
Contributor

Hi @BradErz , though the image is still building using protobuf latest, I think latest release addresses your issue (1.32_4). Please let me know.

@ido-namely
Copy link
Contributor

protoc-gen-go is pinned as of #325, release v1.48_0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants