-
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 -u=patch with argument bumps minor version #26812
Comments
The documentation explains this:
By saying github.com/pkg/errors on the command line you are implicitly saying github.com/pkg/errors@latest. The -u=patch applies to dependencies of the listed packages/modules, not to those packages/modules themselves. Maybe we can revisit semantics for Go 1.12 but these are the Go 1.11 semantics. |
I would agree with the original poster, that this behaviour is very confusing, even reading the docs several times its wasn't clear and caused much hair pulling and time wasted. I believe the reason for this is that it states dependencies and if you running The use case IMO for running With the current design there is no easy way to update a specific package and its dependencies using the patch strategy. The only option is to manually visit to the repo site look for the version and issue the manual |
There is also a bit of a skew between the old and new That provides an opportunity for a nice symmetry: if the I don't think we'll get to this for 1.12, but I'd like to at least make a decision on it early in 1.13 |
Per (brief) discussion above and more in person, I think we should change this. If we introduce |
If That suggests that |
Change https://golang.org/cl/167747 mentions this issue: |
What version of Go are you using (
go version
)?go version devel +5a720d229d Sat Aug 4 16:37:47 2018 +0000 darwin/amd64
Does this issue reproduce with the latest release?
N/A, building from source
What did you do?
Repro provided.
Based on the docs, I was expecting pkg/errors to remain on
v0.6.0
, but instead it got bumped tov0.8.0
. Runninggo get -u=patch
(without arg) did not update the patch version.I would only ever expect the minor version to be bumped when running
go get -u
orgo get -u github.com/pkg/errors
.Likewise I would expect
-u=patch
with or without an arg to operate in the same way.@gopherbot, please add label modules
The text was updated successfully, but these errors were encountered: