Middleman actions should not have execution platforms or properties.
They only exist in order to group inputs.
package com.google.devtools.build.lib.actions;
import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.devtools.build.lib.actions.Artifact.ArtifactExpander;
+import com.google.devtools.build.lib.analysis.platform.PlatformInfo;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
@@ -96,6 +98,19 @@ public final class MiddlemanAction extends AbstractAction {
return true;
}
+ @Override
+ @Nullable
+ public PlatformInfo getExecutionPlatform() {
+ // Middleman actions do not execute actual actions, and therefore have no execution platform.
+ return null;
+ }
+
+ @Override
+ public ImmutableMap<String, String> getExecProperties() {
+ // Middleman actions do not execute actual actions, and therefore have no execution properties.
+ return ImmutableMap.of();
+ }
+
/** Creates a new middleman action. */
public static Action create(
ActionRegistry env,
