-
-
Notifications
You must be signed in to change notification settings - Fork 649
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
Add --fail-fast support to jvm compile #7284
Comments
I'm not sure that we would want to turn |
Related: #6829. The v2 engine currently fails fast, but it's unclear which cases that is desirable in. |
In large graphs, failures that happen early get buried in the output, and aren't surfaced until a lot of other things happen. I think this actually is two things.
Locally, when I'm actively iterating on something, stopping compiles at the first failure would be handy because it becomes actionable more quickly. Also, we have I don't think it should be the default, but it would sure be handy. |
It doesn't become actionable more quickly, does it? You can fix the error immediately and stop/restart if you'd like... |
well usually when I'm compiling a large graph, the error goes by rather quickly, so I have to
In contrast, if fail fast existed, I could set a flag and compile would fail precisely when the first failure is hit. I have my terminal setup to notify me with a notification and a sound when a run fails, so I'll be immediately pinged when it happens and the first thing visible in the terminal would be the last compile error. |
That will only be the case on the first build though, since all future builds should immediately fail with only the unbuildable things. |
yes, but I find the build once, then build again to have more scan-able error output to be frustrating and I think it could be better. |
Currently, jvm compile will attempt to build the full closure provided to it. If a target fails, all of its dependees are canceled, but any other parts of the graph are still compiled.
It would be nice to be able to have pants stop early on failures. Without this it can be frustrating if the failed compile happened relatively early in the compile because its error output is far from the end of the run output.
One approach would be to add a flag to the ExecutionGraph that causes it to exit the scheduler loop on any failure.
The place where failure is handled is:
https://github.com/pantsbuild/pants/blob/8cade53/src/python/pants/backend/jvm/tasks/jvm_compile/execution_graph.py#L324-L335
The text was updated successfully, but these errors were encountered: