-
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: restore ability to see what updates will happen #32039
Comments
The “show what would happen” flag is usually It might be reasonable to make (Perhaps that's what |
On the other hand, I would guess that most Go users are using version control anyway: to some extent, the right approach may be to simply run |
Given the freeze, it seems reasonable to defer this particular issue until 1.14, but it might be useful to make at least a preliminary decision on what the behavior here would be, especially as possibly related
If Also, if Separately, today in 1.12, |
To complicate matters, I'd prefer a
It's unfortunate that these don't have the same name.
When In any case, the new behavior is much closer to the GOPATH behavior, so I hope it won't be unacceptably slow. |
In 1.12,
go list -u -m all
displays the direct and indirect dependencies of the current module that have available updates, andgo get -u
attempts to update those dependencies.In #26902, there was a very nice change that narrowed the set of updates that happen for things like
go get -u -m all
(and other variations likego get -u all
), which now no longer follow the full module-level dependency graph.However, now it is not easy to see what those updates will be:
go list -u -m all
still shows information from the module-level dependency graph.go get -u -m all
or similar pay attention to the package-level import graph to determine what updates actually happen, which is often a subset of what is shown bygo list -u -m all
.It would be nice if something could be done to make the "what updates are available" and "please do those updates" workflow more consistent and easy to remember.
Comments from CL 174099 discussion
Moving over some comments from https://golang.org/cl/174099:
It would be nice if there was some 'go list' invocation that could show the list of available upgrades under the new 'go get' behavior. One could try to do something today on tip by chaining together different commands, such as something like:
That might be close, but I am not sure if that is correct, and clearly that is not convenient.
Putting the above comments together-- it would be nice if there was a recommended way to do something like:
and have step 3. report no more upgrades are available. It would be nice if the same exact arguments could be used in each of those steps (although having them be the same arguments might not end up being possible or desirable based on other constraints).
For example, perhaps 'go list -u -m' could be defined in 1.13 to show the upgrades available under the new 'go get -u -m' behavior. That would mean you could do:
Alternatively, perhaps the meaning of 'all' for 'go list' could be made to conform to the newly narrower meaning meaning of 'all' for 'go get', and then you could do:
Or perhaps there could be some other change to smooth things out here.
Jay responded in CL 174099:
Additional Background
The exact behavior for
go get
might be tweaked further, but in CL 176902, thego get
help currently includes these related excerpts describing the new behavior:Potentially related: #32037, #32038
CC @bcmills, @jayconrod
The text was updated successfully, but these errors were encountered: