aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/commands
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2015-09-18 07:34:13 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-09-21 08:55:19 +0000
commit3815b4cb1e8af84ddfef411a621f47ba6dcaa161 (patch)
treeed16239cc78a7d187d6a2cb0119d59a2bb2bc5ab /src/main/java/com/google/devtools/build/lib/runtime/commands
parent02c490c19a56a1c4151544fca2e3f7a820ee2e51 (diff)
Move the commandId and getCommandStartTime() to CommandEnvironment.
They are usually on the same line, so doing this in separate changes can cause merge conflicts. -- MOS_MIGRATED_REVID=103362797
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/commands')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/BuildCommand.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/MobileInstallCommand.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/TestCommand.java2
6 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/BuildCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/BuildCommand.java
index 0082d7149d..2a89754a9a 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/BuildCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/BuildCommand.java
@@ -67,7 +67,7 @@ public final class BuildCommand implements BlazeCommand {
getClass().getAnnotation(Command.class).name(), options,
runtime.getStartupOptionsProvider(),
targets,
- env.getReporter().getOutErr(), runtime.getCommandId(), runtime.getCommandStartTime());
+ env.getReporter().getOutErr(), env.getCommandId(), env.getCommandStartTime());
return new BuildTool(env).processRequest(request, null).getExitCondition();
}
}
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java
index 8347328e81..d90d27ed9f 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java
@@ -199,7 +199,7 @@ public class InfoCommand implements BlazeCommand {
// In order to be able to answer configuration-specific queries, we need to setup the
// package path. Since info inherits all the build options, all the necessary information
// is available here.
- runtime.setupPackageCache(
+ env.setupPackageCache(
optionsProvider.getOptions(PackageCacheOptions.class),
runtime.getDefaultsPackageContent(optionsProvider));
// TODO(bazel-team): What if there are multiple configurations? [multi-config]
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/MobileInstallCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/MobileInstallCommand.java
index 9701289c57..0c8519379f 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/MobileInstallCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/MobileInstallCommand.java
@@ -80,7 +80,7 @@ public class MobileInstallCommand implements BlazeCommand {
BuildRequest request = BuildRequest.create(
this.getClass().getAnnotation(Command.class).name(), options,
runtime.getStartupOptionsProvider(), targets,
- env.getReporter().getOutErr(), runtime.getCommandId(), runtime.getCommandStartTime());
+ env.getReporter().getOutErr(), env.getCommandId(), env.getCommandStartTime());
return new BuildTool(env).processRequest(request, null).getExitCondition();
}
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java
index dd6ac2549e..84ba83c512 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java
@@ -76,7 +76,7 @@ public final class QueryCommand implements BlazeCommand {
QueryOptions queryOptions = options.getOptions(QueryOptions.class);
try {
- runtime.setupPackageCache(
+ env.setupPackageCache(
options.getOptions(PackageCacheOptions.class),
runtime.getDefaultsPackageContent());
} catch (InterruptedException e) {
@@ -143,7 +143,7 @@ public final class QueryCommand implements BlazeCommand {
try {
QueryOutputUtils.output(queryOptions, result, formatter, output,
queryOptions.aspectDeps.createResolver(
- runtime.getPackageManager(), env.getReporter()));
+ env.getPackageManager(), env.getReporter()));
} catch (ClosedByInterruptException | InterruptedException e) {
env.getReporter().handle(Event.error("query interrupted"));
return ExitCode.INTERRUPTED;
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
index 65a63ec1d8..2a7276d60b 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
@@ -147,7 +147,7 @@ public class RunCommand implements BlazeCommand {
BuildRequest request = BuildRequest.create(
this.getClass().getAnnotation(Command.class).name(), options,
runtime.getStartupOptionsProvider(), targets, outErr,
- runtime.getCommandId(), runtime.getCommandStartTime());
+ env.getCommandId(), env.getCommandStartTime());
currentRunUnder = runUnder;
BuildResult result;
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/TestCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/TestCommand.java
index 9d9ca9de6b..33a636e763 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/TestCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/TestCommand.java
@@ -113,7 +113,7 @@ public class TestCommand implements BlazeCommand {
BuildRequest request = BuildRequest.create(
getClass().getAnnotation(Command.class).name(), options,
runtime.getStartupOptionsProvider(), targets,
- env.getReporter().getOutErr(), runtime.getCommandId(), runtime.getCommandStartTime());
+ env.getReporter().getOutErr(), env.getCommandId(), env.getCommandStartTime());
request.setRunTests();
BuildResult buildResult = new BuildTool(env).processRequest(request, null);