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: get xxx@latest does not get the latest tag #30499

Open
XuHuaiyu opened this Issue Mar 1, 2019 · 3 comments

Comments

Projects
None yet
5 participants
@XuHuaiyu
Copy link

XuHuaiyu commented Mar 1, 2019

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

$ go version
go version go1.12 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/xuhuaiyu/Development/GOPATH/bin"
GOCACHE="/Users/xuhuaiyu/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/xuhuaiyu/Desktop/gopath"
GOPROXY=""
GORACE=""
GOROOT="/Users/xuhuaiyu/.gvm/gos/go1.12"
GOTMPDIR=""
GOTOOLDIR="/Users/xuhuaiyu/.gvm/gos/go1.12/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/xuhuaiyu/Desktop/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/ck/7tvksj1s7cl6djwl1j6kd67m0000gn/T/go-build099338216=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ GO111MODULE=on go get github.com/pingcap/tidb@latest

What did you expect to see?

github.com/pingcap/tidb v2.1.5

What did you see instead?

go: extracting github.com/pingcap/tidb v2.0.11+incompatible

@XuHuaiyu XuHuaiyu changed the title GO111MODULE=on go get github.com/pingcap/tidb@latest does not get the latest version go get xxx@latest does not get the latest version Mar 1, 2019

@XuHuaiyu XuHuaiyu changed the title go get xxx@latest does not get the latest version go get xxx@latest does not get the latest tag Mar 1, 2019

@oiooj oiooj added the modules label Mar 1, 2019

@agnivade agnivade changed the title go get xxx@latest does not get the latest tag cmd/go: get xxx@latest does not get the latest tag Mar 1, 2019

@agnivade agnivade added this to the Go1.13 milestone Mar 1, 2019

@agnivade

This comment has been minimized.

Copy link
Member

agnivade commented Mar 1, 2019

/cc @bcmills

@rleungx

This comment has been minimized.

Copy link

rleungx commented Mar 1, 2019

It seems that the behaviors between v2.0.x and v2.1.x are different. The v2.0.x will get a missing type, but v2.1.x will get a blob type. I'm not sure if it is expected.
https://github.com/golang/go/blob/master/src/cmd/go/internal/modfetch/codehost/git.go#L624

@justinruggles

This comment has been minimized.

Copy link

justinruggles commented Mar 3, 2019

I believe the issue is that the tidb module name does not include the /v2 to indicate major version 2

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.