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

x/net: Can't install golang.org/x/net/publicsuffix #29771

Closed
sb10 opened this issue Jan 16, 2019 · 6 comments
Closed

x/net: Can't install golang.org/x/net/publicsuffix #29771

sb10 opened this issue Jan 16, 2019 · 6 comments

Comments

@sb10
Copy link

sb10 commented Jan 16, 2019

What version of Go are you using (go version)?

$ go version
go version go1.11.4 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/nfs/users/nfs_s/sb10/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/nfs/users/nfs_s/sb10/go"
GOPROXY=""
GORACE=""
GOROOT="/software/vertres/installs/go"
GOTMPDIR=""
GOTOOLDIR="/software/vertres/installs/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="0"
GOMOD="/nfs/users/nfs_s/sb10/src/go/github.com/VertebrateResequencing/wr/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build435748798=/tmp/go-build"

What did you do?

$ mkdir -p /tmp/scratchpad/publicsuffix-test
$ cd /tmp/scratchpad/publicsuffix-test
$ go mod init example.com/test
$ go get golang.org/x/net/publicsuffix

What did you expect to see?

No error.

What did you see instead?

go: finding golang.org/x/net/publicsuffix latest
go: finding golang.org/x/net latest
go get golang.org/x/net/publicsuffix: no matching versions for query "latest"
@gopherbot gopherbot added this to the Unreleased milestone Jan 16, 2019
@mvdan
Copy link
Member

mvdan commented Jan 16, 2019

This succeeds for me on go version go1.11.4 linux/amd64. I'd suggest running go clean -modcache and trying again, in case you have a corrupted module cache.

@sb10
Copy link
Author

sb10 commented Jan 16, 2019

Thanks, that fixed it. Maybe this issue could be changed to be about better error messaging for corrupt module caches? Anyway, I'll just close it for now.

@sb10 sb10 closed this as completed Jan 16, 2019
@mvdan
Copy link
Member

mvdan commented Jan 16, 2019

cc @bcmills, in case he thinks cmd/go could do a better job with corrupt module caches.

@bcmills
Copy link
Contributor

bcmills commented Jan 16, 2019

Our first line of defense against corrupt caches is go.sum (and go mod verify). Beyond that 1.12 should be a lot less likely to corrupt the cache in the first place.

@sb10
Copy link
Author

sb10 commented Jan 16, 2019

@bcmills I see. Unfortunately, this is a case where this is no go.sum (a new package, or an old one being converted to a module for the first time).

@bcmills
Copy link
Contributor

bcmills commented Jan 16, 2019

#28802 or #24117 would mitigate that use-case more directly, but still wouldn't help if the module cache itself is corrupted.

@golang golang locked and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants