aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2018-08-10 23:36:52 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-10 23:38:44 -0700
commit468f177334d4375f762e1dcdb13c51feeed11dfb (patch)
tree7737d2af4390f758c710b9ad35e9bdf5fac1d134 /src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java
parent50af3b73ad40f37ee9f6be989d630d7ae32b4767 (diff)
Refactoring of SkyFunctionEnvironment to iterate over events/postables only when they're actually being put into a committed value. The previous behavior submitted deps' events twice, when the dep was added and when the node finished building.
The intention is to build on this refactoring to cut off events/postables across the analysis-execution boundary, so that actions are not carrying around nested sets of warnings coming from their configured targets. This will be safe because to execute an action, we must already have analyzed its configured target, so the warning would have been emitted there. As can be seen from the changed test, this is not a pure behavior no-op. We will now emit cached events slightly later, on value committal, rather than on first dep declaration. This should not be an issue: since the events are cached, the user must have already seen them on a prior build, so the delay should not be important. Inversely, we now report events slightly more quickly during bubbling up, since we report them at each stage, as opposed to just at ParallelEvaluator evaluation completion. PiperOrigin-RevId: 208316502
Diffstat (limited to 'src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java')
-rw-r--r--src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java b/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java
index 315aa8458c..f8f21f254e 100644
--- a/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java
+++ b/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java
@@ -513,8 +513,8 @@ public abstract class AbstractExceptionalParallelEvaluator<E extends Exception>
errorKey,
ValueWithMetadata.error(
ErrorInfo.fromChildErrors(errorKey, ImmutableSet.of(error)),
- env.buildEvents(parentEntry, /*expectDoneDeps=*/ false),
- env.buildPosts(parentEntry, /*expectDoneDeps=*/ false)));
+ env.buildAndReportEvents(parentEntry, /*expectDoneDeps=*/ false),
+ env.buildAndReportPostables(parentEntry, /*expectDoneDeps=*/ false)));
continue;
}
} finally {
@@ -526,8 +526,8 @@ public abstract class AbstractExceptionalParallelEvaluator<E extends Exception>
errorKey,
ValueWithMetadata.error(
ErrorInfo.fromChildErrors(errorKey, ImmutableSet.of(error)),
- env.buildEvents(parentEntry, /*expectDoneDeps=*/ false),
- env.buildPosts(parentEntry, /*expectDoneDeps=*/ false)));
+ env.buildAndReportEvents(parentEntry, /*expectDoneDeps=*/ false),
+ env.buildAndReportPostables(parentEntry, /*expectDoneDeps=*/ false)));
}
// Reset the interrupt bit if there was an interrupt from outside this evaluator interrupt.