-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: clarify error message for 'go get -u' without arguments in a module root that is not a package #37700
Comments
If you want to update the dependencies of all packages within a module, you want We probably do need a clearer error message for this case. |
https://golang.org/src/cmd/go/internal/modget/get.go#L342
How is this error message ? |
@abemotion That doesn't seem much clearer than the current message. The intent here is most likely to update dependencies for all packages in the main module, rather than the package at the root of the main module. So, specifically if 1)
|
@jayconrod Thank you for your polite reply 😊 Your message is much clearer than my comment's one that doesn't have a hint. |
+1 to a clearer error message - even something like |
The current error is:
|
What version of Go are you using (go version)?
What did you do?
I'm working on a project that has no Go package in the root directory of the module. Running
go get -u
in the root results ingo help get
states bothand
This seems to imply, to me, that running
go get -u
in the root of module with no package in that root shouldn't fail, especially not with such an unclear error. Maybe it would make more sense to have an error that states explicitly how to, for example, update all of the module's dependencies, which is likely what someone runninggo get -u
in the module root without a package is trying to do.The text was updated successfully, but these errors were encountered: