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

go.mod versions seem to require tags beginning with "v" to properly resolve. #34512

Closed
theherk opened this issue Sep 25, 2019 · 2 comments
Closed

Comments

@theherk
Copy link

theherk commented Sep 25, 2019

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

$ go version
go version go1.13 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
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/h4s/.cache/go-build"
GOENV="/home/h4s/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/h4s/projects/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/h4s/projects/cleardata.com/aws/raws/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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build119312209=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.13 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.13
uname -sr: Linux 5.3.1-arch1-1-ARCH
/usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.29.

What did you do?

  • push tag 0.1.0 to the same ref as master
  • go get -u -v github.com/cleardataeng/aidews
  • go.mod shows psuedo version
  • manually update go.mod to 0.1.0
  • go get -u -v github.com/cleardataeng/aidews
  • go.mod shows psuedo version
  • push tag v0.1.0 to the same hash
  • go get -u -v github.com/cleardataeng/aidews
  • go.mod reflects correct version

What did you expect to see?

I expected any tag that resolves to the tip of the default branch to be used as the version identifier.

What did you see instead?

That only tags beginning with "v" were treated accordingly.

Maybe this is not a bug, but I can't see why any tag resolving to the current head wouldn't be treated as the version identifier. Semver 2 is much less explicit about tagging, but the "v" is explicitly not part of the version. So are we after tags or version numbers? If version numbers, the "v" should go. If tags, I'd think any tags regardless of version sufficient.

@seankhliao
Copy link
Member

please see #30146

@bcmills
Copy link
Contributor

bcmills commented Sep 26, 2019

Duplicate of #32945

@bcmills bcmills marked this as a duplicate of #32945 Sep 26, 2019
@bcmills bcmills closed this as completed Sep 26, 2019
@golang golang locked and limited conversation to collaborators Sep 25, 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