go list ... in module mode almost never (or maybe just plain never!) does what a user expects it to do. It tries to list all the packages in all the modules in the build list which in turn requires it to resolve dependencies of those modules that might not be required by the build. Further, those dependencies will not be requirements of the work module which will result in a confusing error in the default -mod=mod mode.
We should return an error if a user requests go list ...: it should still be okay to have ... as part of a pattern with other components, because those components limit the search, and the error should say that the pattern has to have another component, and suggest that the user might want ./... or work (which is usually what they want).
go list ...in module mode almost never (or maybe just plain never!) does what a user expects it to do. It tries to list all the packages in all the modules in the build list which in turn requires it to resolve dependencies of those modules that might not be required by the build. Further, those dependencies will not be requirements of the work module which will result in a confusing error in the default-mod=modmode.We should return an error if a user requests
go list ...: it should still be okay to have...as part of a pattern with other components, because those components limit the search, and the error should say that the pattern has to have another component, and suggest that the user might want./...orwork(which is usually what they want).