Skip to content
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: add prefix to errors when using -x #51781

Open
QuLogic opened this issue Mar 18, 2022 · 4 comments
Open

cmd/go: add prefix to errors when using -x #51781

QuLogic opened this issue Mar 18, 2022 · 4 comments
Labels
GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@QuLogic
Copy link

QuLogic commented Mar 18, 2022

For normal compiles, the output is sparse, and so errors are quite obvious. The fact that sometimes compiling will continue on to other files is not too important.

However, in verbose mode, there is a lot of output and it is very very very difficult to find an error in the sea of verbosity, especially when multiple files were compiled after the actual error. If errors had an error: prefix or similar, it would be far easier to find the source of the problem.

@gopherbot gopherbot added this to the Proposal milestone Mar 18, 2022
@mvdan
Copy link
Member

mvdan commented Mar 18, 2022

What errors? Build errors? And what verbose mode do you mean?

@QuLogic
Copy link
Author

QuLogic commented Mar 18, 2022

Yes, build errors. Sorry, not verbose mode, but with the -x flag of go build. Now that I see it's not directly a verbose flag, per se, maybe this isn't so obvious a thing to link to it.

@seankhliao seankhliao changed the title proposal: Add prefix to errors in verbose mode cmd/go: add prefix to errors when using -x Mar 18, 2022
@seankhliao seankhliao added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go and removed Proposal labels Mar 18, 2022
@seankhliao
Copy link
Member

go build -x ./... 2>&1 | grep '^[^\s]*\.go' works today (errors start with a path to a go file.

@ianlancetaylor ianlancetaylor modified the milestones: Proposal, Backlog Mar 18, 2022
@QuLogic
Copy link
Author

QuLogic commented Mar 20, 2022

Ah, that is useful and works locally at least. But it's annoying if you're viewing a build long on some CI or build server in a browser, since you can't use regex searches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants