@version turns out to be pretty easy, and I'm going to knock that out incidentally for #36460.
I think -versions will require part of the implementation for #29666, though: at the moment, we don't distinguish between -m -json -versions (which should also include information about the current version) and just -m -versions (which, without a -f template, does not need that information).
…ting specific modules
For #36460
For #41297
Updates #29666
Change-Id: I5f324c0ef9a164f8043d2188101d141bb5fa7454
Reviewed-on: https://go-review.googlesource.com/c/go/+/309191
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Both the
go list -m
commands above should succeed.What did you see instead?
Both commands fail. This happens because
go list -m
loads the build list before processing arguments.go.sum
is missing, so that fails.There's no need to load the build list for these commands. They both succeed when run outside a module or when
go.mod
contains no requirements.The text was updated successfully, but these errors were encountered: