cespare / xxhash

A Go implementation of the 64-bit xxHash algorithm (XXH64)
MIT License
1.79k stars 123 forks source link

missing v2 visibility #31

Closed wfbrown53 closed 4 years ago

wfbrown53 commented 4 years ago

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?

cespare commented 4 years ago

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.

wfbrown53 commented 4 years ago

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

cespare commented 4 years ago

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.

cespare commented 4 years ago

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

wfbrown53 commented 4 years ago

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>

iricigor commented 4 years ago

I have the same issue...

fredsted commented 4 years ago

Same issue here.

Edit: Upgraded go and it worked.

kkalin78 commented 4 years ago

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.

isvicy commented 4 years ago

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

cespare commented 4 years ago

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 997e1685cae39ce5a9573990e7fabe3e796898a0.

ArtemChekunov commented 4 years ago

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