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: unnecessarily multiple possible pseudo versions for one commit #27173

Open
hajimehoshi opened this Issue Aug 23, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@hajimehoshi
Contributor

hajimehoshi commented Aug 23, 2018

Please answer these questions before submitting your issue. Thanks!

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

go version go1.11rc2 darwin/amd64

Does this issue reproduce with the latest release?

Yes

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hajimehoshi/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/hajimehoshi/go"
GOPROXY=""
GORACE=""
GOROOT="/Users/hajimehoshi/sdk/go1.11rc2"
GOTMPDIR=""
GOTOOLDIR="/Users/hajimehoshi/sdk/go1.11rc2/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/hajimehoshi/gotest/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/b7/w11sqqrx7kx6fqfbn24wdsmh0000gn/T/go-build335252993=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Create a project repository with a main.go importing github.com/hajimehoshi/ebiten, and created go.mod. I tested 5 types of go.mod:

module example.com/m

require github.com/hajimehoshi/ebiten v0.0.0-20180819111657-1c088dc8b6d3
module example.com/m

require github.com/hajimehoshi/ebiten v1.0.0-20180819111657-1c088dc8b6d3
module example.com/m

require github.com/hajimehoshi/ebiten v1.7.0-alpha.0.20180819111657-1c088dc8b6d3
module example.com/m

require github.com/hajimehoshi/ebiten v1.8.0-alpha.0.20180819111657-1c088dc8b6d3
module example.com/m

require github.com/hajimehoshi/ebiten v1.9.0-alpha.0.20180819111657-1c088dc8b6d3

Run go1.11rc2 mod tidy with each go.mod

What did you expect to see?

go mod tidy should update the dependency version to v1.8.0-alpha.0.20180819111657-1c088dc8b6d3 since there is a tagged commit v1.8.0-alpha

What did you see instead?

In any cases, go mod tidy didn't update go.mod.

I think especially the case of v1.9.0-... seems dangerous since it might pollute the cache and when I release the version v1.9.0-*, the cache might not work well.

@bcmills bcmills added the modules label Aug 23, 2018

@bcmills

This comment has been minimized.

Member

bcmills commented Aug 23, 2018

Note that, in general, a given commit can correspond to multiple tagged versions too: nothing stops you from, say, tagging the same commit as all of v1.8.5, v1.9.0-rc1, and v1.9.0.

@hajimehoshi hajimehoshi changed the title from cmd/go: multiple possible pseudo versions for one commit to cmd/go: unnecessarily multiple possible pseudo versions for one commit Aug 24, 2018

@hajimehoshi

This comment has been minimized.

Contributor

hajimehoshi commented Aug 24, 2018

OK, so I fixed the issue title. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment