cmd/go: error for 'go list' on a missing package is too terse with implicit '-mod=readonly' #41576
Labels
FrozenDueToAge
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
release-blocker
Milestone
Uh oh!
There was an error while loading. Please reload this page.
When
-mod=readonly
is set by default (see #40728), andgo list
fails to find a package named on the command line, it gives an error message of the formcannot find module providing package …
.However, with
-mod=mod
the command resolves the missing package and succeeds.I think that behavior is a bit too subtle. The error message should explain why it didn't try to find a module providing the package, and/or suggest using
go get
to resolve that package.CC @jayconrod @matloob
The text was updated successfully, but these errors were encountered: