-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: enable listing direct dependency updates #40364
Comments
We've discussed this multiple times before with the tooling/modules folks, mostly on Slack and on the golang-tools monthly calls. The only written down notes I could find right now are #27887 (comment); @bcmills @rogpeppe @jayconrod @myitcv might have more links. |
The provided solution uses
I don't think it's reasonable to expect users to type this out every time. A bash alias can be created, but that's not portable and has the same problems as using an external tool (you have to know about it, and set it up). The common use-case for people developing module tooling is not the same as for people consuming the module tooling. I think that most people just want to know if they have any dependencies to edit: I suppose what I actually want is a veneer on top of |
I think this would be good to have. It's pretty common to want to list or upgrade direct dependencies of packages in the main module. It's too hard to do that with
|
An alternative to
|
Some overlap here with #28424. |
Thanks @thepudds. Sorry we missed discussing that one. What do you think about this proposal vs the other? |
/cc @jayconrod @bcmills; what's the status of this? |
cc @matloob I think the idea is good, but I'm not sure about the CLI specifics.
|
Heh, I had a bit of the opposite reaction! All of the existing meta-packages ( |
I think it should list only those requires that are not labeled with an Or, we could disallow the |
I agree that it would be nice for (I think the hypothesized |
Using it with |
It sounds like people are saying:
That is, Do I have that right? Does anyone object to that? |
Re #28424 It seems that the
|
Based on the discussion, this seems like a likely accept. |
(If accepted, this would not be until Go 1.17. There's already a lot for Go 1.16.) |
Just so I understand, this would be a subset of the modules listed in |
No change in consensus, so accepted. |
This comment was marked as duplicate.
This comment was marked as duplicate.
You would see updates here if there were any; please don't ask like that, as it just adds pressure. |
Intro
The recommended approach to listing available module updates is to run the following command.
This displays every dependency along with newer available versions.
My
go.mod
only specifies two dependencies.Problem
The
go list
output gets completely unmanageable when the dependency tree grows. When listing available module updates, I'm only interested in my direct dependencies. Those are the only ones I usually have control over.The
go list
command has a-json
flag which makes it possible to feed into external tools such as https://github.com/psampaz/go-mod-outdated. However, I find it strange that I need external tooling to ask "which modules in go.mod are outdated"Proposal
I propose a mechanism for limiting the
go list
output to direct dependencies.Relates to #40323
The text was updated successfully, but these errors were encountered: