-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: package names are printed to stderr instead of stdout on build #10309
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
Comments
Printing -v output to stderr makes it work well when any errors occur during compilation, or when using -x. Why is this a bug? |
I see what you are saying. When compiling multiple packages, if a package has a compilation error you would like to know which package it is for. However, I believe this is already handled, because if you do
Notice the package name printed once vs the package name printed twice below with the -v flag.
My issue is when there are no "true" errors you still have output to stderr with the -v option. Which in turn leads to issue GoClipse/goclipse#119. |
I agree that the error message tells you which package failed, but it's still convenient to not have strange interleaving in the output. Plus, -x. I don't understand why goclipse is passing -v at all. This doesn't seem like a strong reason to change the way the go tool works. |
I guess I would ask why -x is sent to stderr as well. Why not stdout for that, since it is information and not errors? |
OK, forget -x. We can agree that -x and -v should use the same rule. It's still convenient to not have strange interleaving in the output. I don't see the fact that goclipse decides to pass -v as a compelling reason to change how the tool behaves, because I don't know a reason why goclipse should do that. |
Working as intended. Diagnostic output goes to stderr; that's what stderr is for. |
When passing the -v flag to the go build command, package names are printed to stderr instead of stdout.
Offending code line.
go/src/cmd/go/build.go
Line 845 in 9d02397
The text was updated successfully, but these errors were encountered: