diff options
author | 2018-05-18 12:46:54 -0700 | |
---|---|---|
committer | 2018-05-18 12:48:25 -0700 | |
commit | fbf2756c649649bc821595c562721ebf1af10361 (patch) | |
tree | f1251754c292c922f421a9368c01841232d322ad /src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java | |
parent | beaaf669b6f3651445da222cf43b6c33546c0fb7 (diff) |
Add BuildEventProtocolOptions; use to enable/disable important_outputs
The important_outputs field is deprecated, and this adds a flag to disable
its generation entirely.
PiperOrigin-RevId: 197186530
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java index 4ff32f1e02..a4e295751c 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java +++ b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java @@ -25,6 +25,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.devtools.build.lib.authandtls.AuthAndTLSOptions; import com.google.devtools.build.lib.buildeventservice.client.BuildEventServiceClient; +import com.google.devtools.build.lib.buildeventstream.BuildEventProtocolOptions; import com.google.devtools.build.lib.buildeventstream.BuildEventTransport; import com.google.devtools.build.lib.buildeventstream.PathConverter; import com.google.devtools.build.lib.buildeventstream.transports.BuildEventStreamOptions; @@ -63,7 +64,11 @@ public abstract class BuildEventServiceModule<T extends BuildEventServiceOptions @Override public Iterable<Class<? extends OptionsBase>> getCommonCommandOptions() { - return ImmutableList.of(optionsClass(), AuthAndTLSOptions.class, BuildEventStreamOptions.class); + return ImmutableList.of( + optionsClass(), + AuthAndTLSOptions.class, + BuildEventStreamOptions.class, + BuildEventProtocolOptions.class); } @Override @@ -151,6 +156,9 @@ public abstract class BuildEventServiceModule<T extends BuildEventServiceOptions BuildEventStreamOptions bepOptions = checkNotNull(optionsProvider.getOptions(BuildEventStreamOptions.class), "Could not get BuildEventStreamOptions."); + BuildEventProtocolOptions protocolOptions = + checkNotNull(optionsProvider.getOptions(BuildEventProtocolOptions.class), + "Could not get BuildEventProtocolOptions."); BuildEventTransport besTransport = null; try { @@ -163,6 +171,7 @@ public abstract class BuildEventServiceModule<T extends BuildEventServiceOptions commandName, moduleEnvironment, clock, + protocolOptions, pathConverter, commandLineReporter, startupOptionsProvider); @@ -178,7 +187,7 @@ public abstract class BuildEventServiceModule<T extends BuildEventServiceOptions } ImmutableSet<BuildEventTransport> bepTransports = - BuildEventTransportFactory.createFromOptions(bepOptions, pathConverter); + BuildEventTransportFactory.createFromOptions(bepOptions, protocolOptions, pathConverter); ImmutableSet.Builder<BuildEventTransport> transportsBuilder = ImmutableSet.<BuildEventTransport>builder().addAll(bepTransports); @@ -207,6 +216,7 @@ public abstract class BuildEventServiceModule<T extends BuildEventServiceOptions String commandName, ModuleEnvironment moduleEnvironment, Clock clock, + BuildEventProtocolOptions protocolOptions, PathConverter pathConverter, EventHandler commandLineReporter, OptionsProvider startupOptionsProvider) @@ -244,6 +254,7 @@ public abstract class BuildEventServiceModule<T extends BuildEventServiceOptions commandName, moduleEnvironment, clock, + protocolOptions, pathConverter, commandLineReporter, besOptions.projectId, |