-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/go: 'go get' with semantic-version prefix doesn't fall back to matching tag or branch #29731
Comments
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 CC @jayconrod |
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. |
I would be ok with dropping query-by-prefix in favor of supporting branch names. Maybe file that as a separate proposal, though? |
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:
|
Agreed. I think we're going to try switching it over for 1.14. |
This didn't make 1.14. We can perhaps try again in 1.15. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Following the deprecation of go get with go1.17, an explicit error message prints.
The absence of patch number triggers a message about format without mentioning the patch level which seems appropriate:
Issue seems solved. |
This still reproduces within a module:
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
The package
apns2
added sucessfully to thego.mod
file and downloaded topkg/mod
using pseudo-version or whatever although it doesn't have a valid semver tag (patch number missing).What did you see instead?
This cryptic error (it took me several minutes to realize that a patch version was missing)
Workaround
The only workaround I found is to pin to the latest commit SHA inside the
v0.14
tag on the required repository.CC\ @bcmills
The text was updated successfully, but these errors were encountered: