Skip to content

Commit

Permalink
Middleman actions should not have execution platforms or properties.
Browse files Browse the repository at this point in the history
They only exist in order to group inputs.

PiperOrigin-RevId: 362343540
  • Loading branch information
katre authored and copybara-github committed Mar 11, 2021
1 parent 4c6a4b8 commit 4926955
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
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;
Expand Down Expand Up @@ -96,6 +98,19 @@ public boolean mayInsensitivelyPropagateInputs() {
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,
Expand Down

0 comments on commit 4926955

Please sign in to comment.