-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: list -m -versions omits mismatched major versions #25656
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
Comments
vgo list -t
commandvgo list -t
command
I'll reference an answer I gave in #25674 (comment) There are a couple of things at play here:
As a result therefore, what you are attempting won't, to my understanding, work until point 1 has been addressed. In the meantime you will need to explicitly |
@myitcv In short, according to ur answer, the solution would be
I wish I can get whole versions without go.mod pkg someday. |
Here's a fully working example that uses v3.3.2. Start by getting
Create a module using the
Mark this as a module by creating a
Now because, at the time of writing,
we need to
Now do a build to check all is good:
And check the contents of
Version details for reference:
|
@fransoaardi You can run:
|
@oiooj you're quite right, thank you! |
@oiooj @fransoaardi - for reference, I've also added #25712. As part of the description for that issue, I've asked whether we should perhaps have an issue that more broadly covers the requirements/etc for |
vgo list -t
command
This is basically working as intended but unfortunate for older code that didn't know about the semantic import versioning conventions. Will need to think about whether to surface more here. |
I think this is related: If a project didn't tag a release using a full semver version it won't be listed:
And if you try to get v1.2 it rewrites it as v1.2.0 and fails:
This may be working as designed, but I find it somewhat unexpected. I've asked gin to add a v1.2.0 tag, but maybe vgo should handle it more gracefully? |
The tag of gin usually is |
Just to point out that since https://go-review.googlesource.com/120198 |
The new form is list -m -versions and it still omits the mismatched major versions. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.10.2 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="${home} /Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="${home}/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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/x6/pxwr89_95yxbhw5nh8b7jk1w0000gn/T/go-build318943644=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
just typed
to get available releases but got only these two versions.
Actually, go-chi/chi has latest release of v3.3.2
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
getting whole lists of available release
What did you see instead?
just a part of available release
The text was updated successfully, but these errors were encountered: