Open josharian opened 1 month ago
Interestingly, GOPROXY=direct go list -m -json golang.org/x/tools@latest
seems to work every time.
The VCS info is present in the proxy: https://proxy.golang.org/golang.org/x/tools/@v/v0.21.0.info.
CC @matloob @samthanawalla
@findleyr thanks! That's 80% of a workaround for me!
Unfortunately, the VCS info doesn't appear to always be present in the proxy: https://proxy.golang.org/rsc.io/edit/@v/v1.0.0.info
That VCS info is not always present is, I believe, a known limitation. (CC @suzmue to confirm). The decision was made to not reprocess older versions in the proxy--even ignoring compute resources, we can't guarantee that older versions still exist in at the origin.
But for x/tools@latest, VCS info is present, and yet not returned by go list
. That seems like a bug.
probably related https://github.com/golang/go/issues/66077#issuecomment-1977155854
it does work if the version query is an actual version instead of latest
Change https://go.dev/cl/588575 mentions this issue: cmd/go: let list -m -json include an Origin
Go version
go version go1.22.3 darwin/arm64
Output of
go env
in your module/workspace:Bug report
This is a regression. With Go 1.22.3:
Note that there is no Origin field.
With Go 1.21.10:
Given the conversation in https://github.com/golang/go/issues/57051, it is clear that the intent is that the Origin field be present.
Relevant to https://github.com/golang/go/issues/18387.