-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: list deprecations and newer available major, minor versions #67420
Comments
That would be useful instead of currently having to manually click |
CC @matloob |
Maybe that command could provide more info than just versions, to avoid having to introduce multiple such Otherwise, we have prior art like |
This seems like it could be useful. |
@seankhliao You changed the title, but my proposal is for both major and minor versions. |
I did, but minor version info is already available (the |
Hm, I was hoping for one command to show me all version information. But yes, adding major is new and hard, but I still think it is useful to have one command which can show both. One reason is that you can sometimes then see that a module has both a newer minor and newer major version, implying that the old major version is still maintained. |
Having a single clear place to go to get all version related questions answered is good UX. I don't want to have to remember two things. That's one too many things! |
This proposal has been added to the active column of the proposals project |
What if we add a new MajorUpdate field to the Module struct that is output from go list -m, with these semantics:
Would that be enough for people? |
Have all remaining concerns about this proposal been addressed? The proposal details are in #67420 (comment). |
I think so. Thanks. |
Yes, they do. |
Would |
No, each -u contains one result, since the (pre-existing) Update field can only describe one version. |
Based on the discussion above, this proposal seems like a likely accept. The proposal details are in #67420 (comment). |
No change in consensus, so accepted. 🎉 The proposal details are in #67420 (comment). |
Does this proposal include a corresponding change to the module proxy? Perhaps a
|
Proposal Details
This is a followup to #40323. In there the proposal was to print out warnings during other commands when there are newer versions of modules available.
This proposal instead proposes a new sub-command to
go mod
, something likego mod check
orgo mod upgradeable
which would check existing dependencies for:It could print that out in readable format or in JSON format (so that other tools could take that as input). I think this would allow then various plumbing with CI and other tooling to get warnings, errors, notifications, e-mail notifications, whatever. It would also not pollute all other go commands with messages people might not expect. I can imagine then somebody making a linter for golangci-lint which would require that everything is on the latest version. Or whichever policy you want.
The command could then also be extended in the future (suggesting fixes, adding additional checks - like suggesting which version changes might reduce the number of different versions in the program) without adding noise to existing other commands.
The text was updated successfully, but these errors were encountered: