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

cmd/go: 'go get' with semantic-version prefix doesn't fall back to matching tag #29731

Open
lopezator opened this issue Jan 14, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@lopezator
Copy link

commented Jan 14, 2019

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

$ go version
go version go1.11.4 darwin/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="/Users/d.lopez/go/bin"
GOCACHE="/Users/d.lopez/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/d.lopez/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11.4/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/d.lopez/go/src/gitlab.mycompany.com/my-user/my-project/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 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/6n/q8wt03m13_x3w6v5__mzkwgc0000gn/T/go-build342969942=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

go get github.com/sideshow/apns2@v0.14

What did you expect to see?

The package apns2 added sucessfully to the go.mod file and downloaded to pkg/mod using pseudo-version or whatever although it doesn't have a valid semver tag (patch number missing).

What did you see instead?

This cryptic error (it took me several minutes to realize that a patch version was missing)

go get github.com/sideshow/apns2@v0.14: no matching versions for query "v0.14"

Workaround

The only workaround I found is to pin to the latest commit SHA inside the v0.14 tag on the required repository.

CC\ @bcmills

@bcmills bcmills added this to the Go1.13 milestone Jan 14, 2019

@bcmills bcmills changed the title cmd/go: go get with invalid semver tags doesn't work and gives poor debug info cmd/go: 'go get' with semantic-version prefix doesn't fall back to matching tag Jan 14, 2019

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