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: ability to list available major versions of a module #26286
Picking up discussion from https://go-review.googlesource.com/c/vgo/+/122075#message-2f083e869e098fd047f0f846690e3c0b8c9dd191:
There are two that I've come across so far:
In both cases, especially for custom import paths, this involves a couple of lookups via curl, github etc. Not impossible, but if we had this as part of the vgo command that would help.
There is a more general case of the “converting a project” use-case: it is very similar to “upgrading a project to a new major version”.
At some point we may want some sort of mode (
We probably shouldn't actually implement that mode at this point in time, but we can at least consider how
referenced this issue
Jul 16, 2018
For legacy concerns this is a duplicate of #26238, and the fix for that issue will start showing legacy v2 v3 etc as if they were "versions" of v1.
For non-legacy concerns (you're using x and want to find out that x/v2 exists) I think that's beyond the scope of the go command.
So closing as duplicate / out of scope.
I hope this will be reconsidered. I think major versions being developed and maintained as if they are separate projects is the exception, not the rule.
It wouldn't surprise me if hiding the availability of new major versions from developers who are querying for out of date dependencies contributes to a hesitance to bump major versions at all, even when semver semantics demands it.