diff options
author | Ulf Adams <ulfjack@google.com> | 2017-02-01 11:48:07 +0000 |
---|---|---|
committer | Yun Peng <pcloudy@google.com> | 2017-02-01 14:30:05 +0000 |
commit | 62dbdfec3d7f6effc182f2e15f84acf0b6fa2f72 (patch) | |
tree | 15d686ea533277fa0ae18b9552b62c843172e4af /src/test/java/com/google/devtools/build/lib/actions/util | |
parent | bef4fbed3d22a976b895a3f75ad41699747c286e (diff) |
Simplify the Spawn interface, update Executor interface
Drop the Spawn.getOwner() method, which was duplicating functionality
already available through Spawn.getResourceOwner(), in favor of the
latter. In order to do that, change Executor.reportSubcommand to take
a Spawn instance instead, which in turn requires updating all call
sites.
This is part of establishing Spawn as an abstraction for lower-level
local and remote execution in all cases instead of passing args, env,
input/output files and possibly other metadata as individual method
parameters to the underlying implementations.
In order for that to be maintainable, Spawn should be light-weight and
easy to construct correctly, and not contain too much unnecessary data.
--
PiperOrigin-RevId: 146224914
MOS_MIGRATED_REVID=146224914
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/actions/util')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/actions/util/DummyExecutor.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/actions/util/DummyExecutor.java b/src/test/java/com/google/devtools/build/lib/actions/util/DummyExecutor.java index 606fe159e9..2c61ef7192 100644 --- a/src/test/java/com/google/devtools/build/lib/actions/util/DummyExecutor.java +++ b/src/test/java/com/google/devtools/build/lib/actions/util/DummyExecutor.java @@ -15,6 +15,7 @@ package com.google.devtools.build.lib.actions.util; import com.google.common.eventbus.EventBus; import com.google.devtools.build.lib.actions.Executor; +import com.google.devtools.build.lib.actions.Spawn; import com.google.devtools.build.lib.actions.SpawnActionContext; import com.google.devtools.build.lib.events.EventHandler; import com.google.devtools.build.lib.util.Clock; @@ -88,7 +89,7 @@ public final class DummyExecutor implements Executor { } @Override - public void reportSubcommand(String reason, String message) { + public void reportSubcommand(Spawn spawn) { throw new UnsupportedOperationException(); } }
\ No newline at end of file |