forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Errors in
--loop
wait for changes rather than re-running immediately (
pantsbuild#18367) As reported in pantsbuild#16727, errors occurring in a `--loop` currently retry indefinitely, because we do not preserve the `Generation` value of a Node in the case where an error is raised. This change adjusts the signatures of `Graph` methods to preserve the `Generation` value in case of errors, and additionally allows "pollers" to be added to errored (`NotStarted`) `Node`s. This fix is slightly different from what was [suggested on the issue](pantsbuild#16727 (comment)): it does _not_ reintroduce memoization of errors, as that would open a can of worms around "which" errors are safe to memoize. Instead, only the method signatures involved in `poll`ing are affected, essentially by transposing `Result<(Value, Generation), ...>` to `(Result<Value, ..>, Generation)`. Fixes pantsbuild#16727.
- Loading branch information
Showing
6 changed files
with
135 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.