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

proposal: cmd/go: generate add flag to fail fast #57118

Open
tzachshabtay opened this issue Dec 6, 2022 · 2 comments
Open

proposal: cmd/go: generate add flag to fail fast #57118

tzachshabtay opened this issue Dec 6, 2022 · 2 comments
Milestone

Comments

@tzachshabtay
Copy link

tzachshabtay commented Dec 6, 2022

In our project we run go generate ./... on a big code-base, if there's an error go generate skips the package and carries on, only returning an error code at the end. This makes it hard to scroll through the mountain of logs to find the actual error.

It would be great if we had a fail fast flag, i.e something like go generate --fail-fast ./... that would stop on the first error it sees, to make it clear where the error is coming from (and also to save time).

@gopherbot gopherbot added this to the Proposal milestone Dec 6, 2022
@seankhliao seankhliao changed the title proposal: go generate: add option to fail fast proposal: cmd/go: generate add flag to fail fast Dec 6, 2022
@mvdan
Copy link
Member

mvdan commented Dec 7, 2022

Worth noting that go test -failfast exists; see go help testflag. Though right now I can't remember if it works per-package, or across all packages being tested. The docs aren't clear.

@ianlancetaylor ianlancetaylor added the GoCommand cmd/go label Dec 7, 2022
@ianlancetaylor
Copy link
Contributor

CC @bcmills @matloob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Incoming
Development

No branches or pull requests

4 participants