Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: list -m -versions omits mismatched major versions #25656
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
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
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:
@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
referenced this issue
Jun 6, 2018
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?