cespare/xxhash

missing v2 visibility

Closed this issue · 11 comments

Trying to build a govendor package and the github.com/prometheus/client_golang references a xxhash/v2, specically github.com/cespare/xxhash/v2 v2.1.0. Is that version available for build purposes?

Yes: https://github.com/cespare/xxhash/tree/v2.1.0

I don't know what the problem is, but I don't think it's on my end.

$ git clone https://github.com/prometheus/client_golang /tmp/prom
Cloning into '/tmp/prom'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 4808 (delta 1), reused 1 (delta 0), pack-reused 4802
Receiving objects: 100% (4808/4808), 1.64 MiB | 5.72 MiB/s, done.
Resolving deltas: 100% (2950/2950), done.
$ cd /tmp/prom/prometheus
$ go test -run xxx
testing: warning: no tests to run
PASS
ok      github.com/prometheus/client_golang/prometheus  0.004s
$ go mod graph | grep xxhash
github.com/prometheus/client_golang github.com/cespare/xxhash/v2@v2.1.0

The fact that #30 was filed yesterday makes me wonder what's happening, though.

ok. Try fetching and building github.com/carlpett/stream_exporter with govendor. Sorry that I would think my issue was complete enough.

You haven't given me an indication that there's a problem with my module. You can see for yourself that the git tag is there. If there's a problem with govendor, take it up with @kardianos.

FWIW if I clone https://github.com/carlpett/stream_exporter I can run govendor build +p and it works.

Go figure. It must be something in my win10 env. Here is some runs.
C:\Users\bro\go\src>govendor -version
v1.0.9

C:\Users\bro\go\src>govendor init

C:\Users\bro\go\src>govendor fetch github.com/carlpett/stream_exporter

C:\Users\bro\go\src>govendor build +p

C:\Users\bro\go\src>

Deleted everything under src and retried

C:\Users\bro\go\src>govendor init

C:\Users\bro\go\src>govendor fetch github.com/carlpett/stream_exporter

C:\Users\bro\go\src>
C:\Users\bro\go\src>govendor build +p
vendor\github.com\prometheus\client_golang\prometheus\desc.go:22:2: cannot find package "github.com/cespare/xxhash/v2" in any of:
C:\Users\bro\go\src\vendor\github.com\cespare\xxhash\v2 (vendor tree)
c:\go\src\github.com\cespare\xxhash\v2 (from $GOROOT)
C:\Users\bro\go\src\github.com\cespare\xxhash\v2 (from $GOPATH)
Error: exit status 1

C:\Users\bro\go\src>

I have the same issue...

Same issue here.

Edit: Upgraded go and it worked.

I got same issue and debugged a bit. I narrowed down it to Golang 1.10.2. Upgrading Golang version to 1.10.8 solved the issue. I didn't try more recent Golang versions. Hope it gives some ideas about a source of the issue.

same here with govendor. Does anyone find anything could help us out?

You definitely need a version of Go with module support (1.11+) to use v2 of this module.

I added a note to the README in 997e168.

GO111MODULE=on go mod vendor is solved the problem for me