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 seems to have a problem with changing length of version strings #37529

Closed
d-schmidt opened this issue Feb 27, 2020 · 1 comment
Closed

Comments

@d-schmidt
Copy link

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

$ go version
go version go1.14 windows/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
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\admin\AppData\Local\go-build
set GOENV=C:\Users\admin\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=i:\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=i:\git\apache_download\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\admin\AppData\Local\Temp\go-build612841182=/tmp/go-build -gno-record-gcc-switches

What did you do?

I followed the module docs.

go.mod:6: no matching versions for query "v1.2"
  • on a hunch after some tries I forked it and "released" a v1.2.0
  • go get did find my v1.2.0

What did you expect to see?

go downloading v1.2

What did you see instead?

go downloading v1.1.1 and refusing v1.2

@bcmills
Copy link
Contributor

bcmills commented Feb 28, 2020

1.2 is not a well-formed semantic version.

The go get command supports a small set of version queries beyond just canonical semantic versions, but in general it requires tags to be the character v plus a canonical, well-formed semantic version.

For more detail, see https://blog.golang.org/publishing-go-modules.

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

3 participants