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 version query not right #28931

Closed
songjiayang opened this issue Nov 23, 2018 · 2 comments
Closed

go mod version query not right #28931

songjiayang opened this issue Nov 23, 2018 · 2 comments

Comments

@songjiayang
Copy link

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

$ go version
go version go1.11.2 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=""
GOCACHE="/Users/songjiayang/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/songjiayang/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/songjiayang/workspace/gin-mod/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/zb/p5mbxpss5j19k76c9kd3wy5jxfrpjg/T/go-build063183439=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I use go mod

What did you expect to see?

I use go mod edit -require=github.com/gin-gonic/gin@v1.2 to upgrade gin version from v1.1.4 to v1.2. When I run code , I get some error.

What did you see instead?

There is a error likeinvalid module version "v1.2": no matching versions for query "v1.2" .
I checked there is a gin released version with tag v1.2. I guess in mod version query it converted v1.2 to v1.2.0.

@myitcv
Copy link
Member

myitcv commented Nov 23, 2018

v1.2 is not a valid semver version. Go modules relies on valid semver versions.

https://github.com/gin-gonic/gin/releases/tag/v1.3.0 appears to be the only valid semver tag on that repo.

If you require v1.2 I would suggest you ask that the owners tag with v1.2.0.

@myitcv myitcv closed this as completed Nov 23, 2018
@songjiayang
Copy link
Author

get it

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