aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2017-10-13 17:35:44 +0200
committerGravatar Jakob Buchgraber <buchgr@google.com>2017-10-16 17:48:26 +0200
commit7fdb3b569f8af031b6368c86cdf2dc87cb88b7b9 (patch)
tree84e7f81191d1d7a9e7df6072bd9998ecd6106c7c /src/main
parentda7e0d6e4ce0885523b066bb4eb2f944678ebe01 (diff)
BEP: link structured command line
Change ceb1013c1ca0238188e2714442fcfb2efb16bc6a added an event for the structured command line to the BEP. Announce that event as a child of the build-starting event so that it gets properly chained and does not have to be chained in by a progress event. Change-Id: I6aeb46b748a536da58a916b9c4e0b1b66bbd40b0 PiperOrigin-RevId: 172100341
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/google/devtools/build/lib/buildtool/buildevent/BuildStartingEvent.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/CommandLineEvent.java4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/buildevent/BuildStartingEvent.java b/src/main/java/com/google/devtools/build/lib/buildtool/buildevent/BuildStartingEvent.java
index df601bb1ca..5c469993fd 100644
--- a/src/main/java/com/google/devtools/build/lib/buildtool/buildevent/BuildStartingEvent.java
+++ b/src/main/java/com/google/devtools/build/lib/buildtool/buildevent/BuildStartingEvent.java
@@ -24,6 +24,7 @@ import com.google.devtools.build.lib.buildeventstream.GenericBuildEvent;
import com.google.devtools.build.lib.buildeventstream.ProgressEvent;
import com.google.devtools.build.lib.buildtool.BuildRequest;
import com.google.devtools.build.lib.runtime.CommandEnvironment;
+import com.google.devtools.build.lib.runtime.CommandLineEvent;
import java.util.Collection;
/**
@@ -83,6 +84,8 @@ public final class BuildStartingEvent implements BuildEvent {
return ImmutableList.of(
ProgressEvent.INITIAL_PROGRESS_UPDATE,
BuildEventId.unstructuredCommandlineId(),
+ BuildEventId.structuredCommandlineId(CommandLineEvent.OriginalCommandLineEvent.LABEL),
+ BuildEventId.structuredCommandlineId(CommandLineEvent.CanonicalCommandLineEvent.LABEL),
BuildEventId.optionsParsedId(),
BuildEventId.workspaceStatusId(),
BuildEventId.targetPatternExpanded(request.getTargets()),
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommandLineEvent.java b/src/main/java/com/google/devtools/build/lib/runtime/CommandLineEvent.java
index 232aa45123..5e6269c843 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/CommandLineEvent.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/CommandLineEvent.java
@@ -172,7 +172,7 @@ public abstract class CommandLineEvent implements BuildEventWithOrderConstraint
/** This reports a reassembled version of the command line as Bazel received it. */
public static class OriginalCommandLineEvent extends CommandLineEvent {
- private static final String LABEL = "original";
+ public static final String LABEL = "original";
private final Optional<List<Pair<String, String>>> originalStartupOptions;
public OriginalCommandLineEvent(
@@ -267,7 +267,7 @@ public abstract class CommandLineEvent implements BuildEventWithOrderConstraint
/** This reports the canonical form of the command line. */
public static class CanonicalCommandLineEvent extends CommandLineEvent {
- private static final String LABEL = "canonical";
+ public static final String LABEL = "canonical";
public CanonicalCommandLineEvent(
BlazeRuntime runtime, String commandName, OptionsProvider commandOptions) {