diff options
author | ulfjack <ulfjack@google.com> | 2017-12-22 00:59:05 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2017-12-22 01:01:04 -0800 |
commit | d8a9344699da2f6258eafa22566c7e541ec09792 (patch) | |
tree | dcbea48dc03ec18d98238184d3a9ffaf7930ab81 /src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java | |
parent | e63a867feb2483851b5169894ff7b3c0bdb26581 (diff) |
Move TargetCompleteEvent generation to the CompletionFunction
This change breaks without https://github.com/bazelbuild/bazel/commit/a0ea569f7df19b8284846a52854e73747f7ec005; if that change is rolled back, this
change has to be rolled back as well.
It was previously in ExecutionProgressReceiver, and directly hooked into
Skyframe. Now that we have a way to post event bus events directly from
Sky functions, we should just do that.
Also, this allows us to access artifact metdata, since the completion function
has all the necessary artifacts as dependencies, which in turn can be used to
improve the build event protocol implementation, where we want to post URLs to
the CAS, which requires knowing the checksum.
PiperOrigin-RevId: 179903333
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java b/src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java index 4a6e8aaa71..c1e7805bf7 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java @@ -57,7 +57,7 @@ public final class TargetCompleteEvent BuildEventWithConfiguration { private final ConfiguredTarget target; private final NestedSet<Cause> rootCauses; - private final Collection<BuildEventId> postedAfter; + private final ImmutableList<BuildEventId> postedAfter; private final Iterable<ArtifactsInOutputGroup> outputs; private final NestedSet<Artifact> baselineCoverageArtifacts; private final boolean isTest; @@ -71,7 +71,7 @@ public final class TargetCompleteEvent this.rootCauses = (rootCauses == null) ? NestedSetBuilder.<Cause>emptySet(Order.STABLE_ORDER) : rootCauses; - ImmutableList.Builder postedAfterBuilder = ImmutableList.builder(); + ImmutableList.Builder<BuildEventId> postedAfterBuilder = ImmutableList.builder(); for (Cause cause : getRootCauses()) { postedAfterBuilder.add(BuildEventId.fromCause(cause)); } @@ -94,13 +94,13 @@ public final class TargetCompleteEvent } /** Construct a successful target completion event. */ - public static TargetCompleteEvent createSuccessfulTarget( + public static TargetCompleteEvent successfulBuild( ConfiguredTarget ct, NestedSet<ArtifactsInOutputGroup> outputs) { return new TargetCompleteEvent(ct, null, outputs, false); } /** Construct a successful target completion event for a target that will be tested. */ - public static TargetCompleteEvent createSuccessfulTestTarget(ConfiguredTarget ct) { + public static TargetCompleteEvent successfulBuildSchedulingTest(ConfiguredTarget ct) { return new TargetCompleteEvent(ct, null, ImmutableList.<ArtifactsInOutputGroup>of(), true); } @@ -147,7 +147,7 @@ public final class TargetCompleteEvent @Override public Collection<BuildEventId> getChildrenEvents() { - ImmutableList.Builder childrenBuilder = ImmutableList.builder(); + ImmutableList.Builder<BuildEventId> childrenBuilder = ImmutableList.builder(); for (Cause cause : getRootCauses()) { childrenBuilder.add(BuildEventId.fromCause(cause)); } |