diff options
author | 2017-01-31 13:48:24 +0000 | |
---|---|---|
committer | 2017-02-01 08:52:39 +0000 | |
commit | bd10ed1eac9ce2dd42e2638b18edc6afea748909 (patch) | |
tree | 4628d98cce219a61d11aa418b3a2285426e896a3 /src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java | |
parent | 0c08942935c975246cf57a434b997d1614e0c5af (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/worker/WorkerKey.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java b/src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java index d01b83e868..69927d30e1 100644 --- a/src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java +++ b/src/main/java/com/google/devtools/build/lib/worker/WorkerKey.java @@ -16,7 +16,7 @@ package com.google.devtools.build.lib.worker; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.hash.HashCode; -import com.google.devtools.build.lib.actions.BaseSpawn; +import com.google.devtools.build.lib.actions.Spawns; import com.google.devtools.build.lib.util.Preconditions; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; @@ -129,6 +129,6 @@ final class WorkerKey { @Override public String toString() { - return BaseSpawn.asShellCommand(args, execRoot, env); + return Spawns.asShellCommand(args, execRoot, env); } } |