aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/standalone
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2017-01-31 13:48:24 +0000
committerGravatar Yun Peng <pcloudy@google.com>2017-02-01 08:52:39 +0000
commitbd10ed1eac9ce2dd42e2638b18edc6afea748909 (patch)
tree4628d98cce219a61d11aa418b3a2285426e896a3 /src/main/java/com/google/devtools/build/lib/standalone
parent0c08942935c975246cf57a434b997d1614e0c5af (diff)
Simplify the Spawn interface
Remove getSpawnInfo and asShellCommand, which are never really overridden in a useful way. asShellCommand moves to the Spawns class, and getSpawnInfo is only ever called by SpawnAction, and the implementation moves there. I'm considering using Spawn as the general lower-level abstraction for both local and remote execution. It sort of is that already, except it's not used consistently - we often pass a tuple of (args, env) plus possibly input and output files through parameter-heavy method call hierarchies instead of using this existing abstraction. However, I'm concerned about the amount of baggage it's carrying as well as the number of implementations for what is supposed to be a simple interface (or possibly even a simple value class), and this is an attempt to slim it down a bit. This should have no visible effects on builds. -- PiperOrigin-RevId: 146109838 MOS_MIGRATED_REVID=146109838
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/standalone')
-rw-r--r--src/main/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategy.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategy.java b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategy.java
index e076f4d617..040a6548b0 100644
--- a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategy.java
+++ b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategy.java
@@ -70,7 +70,7 @@ public class StandaloneSpawnStrategy implements SpawnActionContext {
if (executor.reportsSubcommands()) {
executor.reportSubcommand(
Label.print(spawn.getOwner().getLabel()) + " [" + spawn.getResourceOwner().prettyPrint()
- + "]", spawn.asShellCommand(executor.getExecRoot()));
+ + "]", Spawns.asShellCommand(spawn, executor.getExecRoot()));
}
executor