aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/standalone
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2015-09-15 11:13:08 +0000
committerGravatar John Field <jfield@google.com>2015-09-15 20:27:14 +0000
commit633f539e989de4304123027157e7e3bce338483c (patch)
tree747bb4a96e1e2e065375c247da22e0acca8df2a7 /src/main/java/com/google/devtools/build/lib/standalone
parent13fb7fd8959c57999b2d705ae041757ba1e90f12 (diff)
Introduce CommandEnvironment and pass it instead of BlazeRuntime.
The very long term plan is to make BlazeRuntime immutable, so that we can run multiple commands in the same server. -- MOS_MIGRATED_REVID=103080946
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/standalone')
-rw-r--r--src/main/java/com/google/devtools/build/lib/standalone/StandaloneModule.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneModule.java b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneModule.java
index 005af2ae35..e880043ea0 100644
--- a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneModule.java
+++ b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneModule.java
@@ -21,6 +21,7 @@ import com.google.devtools.build.lib.buildtool.buildevent.BuildStartingEvent;
import com.google.devtools.build.lib.runtime.BlazeModule;
import com.google.devtools.build.lib.runtime.BlazeRuntime;
import com.google.devtools.build.lib.runtime.Command;
+import com.google.devtools.build.lib.runtime.CommandEnvironment;
/**
* StandaloneModule provides pluggable functionality for blaze.
@@ -36,9 +37,9 @@ public class StandaloneModule extends BlazeModule {
}
@Override
- public void beforeCommand(BlazeRuntime runtime, Command command) {
- this.runtime = runtime;
- runtime.getEventBus().register(this);
+ public void beforeCommand(Command command, CommandEnvironment env) {
+ this.runtime = env.getRuntime();
+ env.getEventBus().register(this);
}
@Subscribe