-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When a dep transitions from done to dirty on a node in error, defer s…
…etting the error regardless of whether or not we "should" fail fast. If we attempt to fail fast, setting the error causes an `IllegalStateException` because the node has not been signaled by the dep that transitioned from done to dirty (the preconditions check for `isReady()` fails). Instead, avoid preventing new evaluations and follow the same strategy as in the `!shouldFailFast` case: allow the dep to finish and signal the failing node. Although it seems like we should be able to set the error without waiting for the rewound dep to complete, I felt it was safer to maintain the invariants that a) a node's value is only set after it is signaled by all deps and b) `signalDep` is only called with done deps. I did not want to violate one of these two for such an obscure case. Cleans up the semantics of `maybeHandleRegisteringNewlyDiscoveredDepsForDoneEntry` to only return true if we are in the "done to dirty" (rewinding) situation. Previously, it was also returning true if all newly discovered deps were not yet done in a `--nokeep_going` build (and thus removed). Some sky functions actually do throw an exception even after all newly requested deps are not done, for example `ConfiguredTargetFunction` (I assume it requests more "optional" deps in an attempt to report as many root causes as possible). Since this case is now distinct from the rewinding case, we continue to fail fast. PiperOrigin-RevId: 479641479 Change-Id: I52aa52dbe3ee104c7293eaa6857e11e44e6245f2
- Loading branch information
1 parent
971e229
commit 7cc4812
Showing
3 changed files
with
87 additions
and
18 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
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