golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.73k stars 17.63k forks source link

cmd/go: 'go list' should support -u=patch #41006

Closed jerome-laforge closed 4 months ago

jerome-laforge commented 4 years ago

Background

Currently, it is not possible to list available update module only for patch. For example:

module github.com/test/test

go 1.15

require go.mongodb.org/mongo-driver v1.3.6

I want to know if a new patch version if available (here v1.3.7 and not v1.4.0), but I don't know how to do. The given example here https://github.com/golang/go/wiki/Modules#how-to-upgrade-and-downgrade-dependencies is for direct with minor and patch (I just want patch). And yet, the v1.3.7 has been released (https://pkg.go.dev/mod/go.mongodb.org/mongo-driver@v1.3.7).

$ go list -u -m all | grep "go.mongodb.org/mongo-driver"
go.mongodb.org/mongo-driver v1.3.6 [v1.4.0]

Description

I propose to add -u=patch (as already proposed for go get)

$ go list -u=patch -m all | grep "go.mongodb.org/mongo-driver"
go.mongodb.org/mongo-driver v1.3.6 [v1.3.7]
bcmills commented 4 years ago

CC @jayconrod @matloob

Honestly, I'm surprised that list doesn't already support -u=patch. (I think we should just do this — no need for a formal proposal.)

gopherbot commented 2 years ago

Change https://go.dev/cl/432536 mentions this issue: cmd/go: add -u=patch option for go list

goto1134 commented 1 year ago

@bcmills , seems like the review is stuck on waiting for your reply. Could you come back to it when it'll be convenient for you?

samthanawalla commented 4 months ago

@rsc @matloob and I discussed this today. We're going to wait on #67420 to get approved and add this functionality alongside it. I will close this issue in favor of the other one. :)

samthanawalla commented 4 months ago

Marking as duplicate