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

pbutil: dependencies/tests fail with github.com/golang/protobuf v1.1.0 #13

Closed
mpx opened this issue May 27, 2018 · 3 comments

Comments

@mpx
Copy link

commented May 27, 2018

github.com/golang/protobuf v1.1.0 (and later) have removed the testdata directory so it can no longer be imported. This breaks tests:

$ go test
# github.com/matttproud/golang_protobuf_extensions/pbutil
all_test.go:27:2: cannot find package "github.com/golang/protobuf/proto/testdata" in any of:
	/home/mark/go1.10.2/src/github.com/golang/protobuf/proto/testdata (from $GOROOT)
	/home/mark/src/github.com/golang/protobuf/proto/testdata (from $GOPATH)
FAIL	github.com/matttproud/golang_protobuf_extensions/pbutil [setup failed]

I noticed this when attempting to use vgo vendor with a module that depends on github.com/prometheus/client_golang/prometheus. vgo is unable to enumerate dependencies since pbutil's dependencies are broken.

@mpx

This comment has been minimized.

Copy link
Author

commented May 27, 2018

Ahh, I just noticed I was using v1.0.0 which doesn't include the fix in c12348c.

Can you please tag a new release?

@matttproud

This comment has been minimized.

Copy link
Owner

commented May 28, 2018

Thanks for noticing. I had expected vgo would not be happy about something.

https://github.com/matttproud/golang_protobuf_extensions/releases/tag/v1.0.1

@matttproud matttproud closed this May 28, 2018
@sneko

This comment has been minimized.

Copy link

commented Jun 24, 2018

Hi! @mpx how did you succeed in solving this issue? On my side I'm trying to import the Prometheus Metrics library but I got same kind of error.

        import "github.com/go-kit/kit/metrics/prometheus" ->
        import "github.com/prometheus/client_golang/prometheus" ->
        import "github.com/prometheus/common/expfmt" ->
        import "github.com/matttproud/golang_protobuf_extensions/pbutil" ->
        import "github.com/golang/protobuf/proto/testdata" 

It tries to get "github.com\golang\protobuf@v1.1.0\proto\testdata" but it fails... Any idea how to simply fix that please?

EDIT: Since these librairies do not have yet their own go.mod file targeting a specific tag of golang_protobuf_extensions, why does it try to get v1.0.0 instead of the v1.0.1 😢 ? I was thinking it was always looking for the latest version...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.