Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: 'go get' with semantic-version prefix doesn't fall back to matching tag or branch #29731
What version of Go are you using (
changed the title
cmd/go: go get with invalid semver tags doesn't work and gives poor debug info
Jan 14, 2019
This is more-or-less the same underlying issue as #33010.
Unfortunately, the behavior is necessarily going to be a bit confusing one way or the other: if a repository has a tag
In general this should only be a transitional problem anyway: we expect that, going forward, folks who tag versions for use with the
I think this is a bigger problems for branches. I think it will be very common for people to name major or minor release branches like
I wonder if we should actually drop the query functionality for these names? I get the impression that most people don't know about it or don't use it. The ability to get the tip of one of these branches seems more useful to me.
FWIW, I agree with @jayconrod's #29731 (comment) to drop query-by-prefix to better support branch names. I think that would be a net win, and better align with people's intuitions about what happens in common cases.
Two related comments: