aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2015-09-16 09:11:33 +0000
committerGravatar Florian Weikert <fwe@google.com>2015-09-16 10:18:31 +0000
commit806130233d4d190dbfaf6a28feb84eb5a010f1c7 (patch)
tree694f1d68224b890fbd339d0d4086736be356fe6c /src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
parentd8b4be1670e9582e89dfc2677cb507422cf3b1a2 (diff)
Change most calls to BlazeRuntime.getReporter() to use CommandEnvironment.
-- MOS_MIGRATED_REVID=103175472
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
index c1ec4481f1..40d4e889d5 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
@@ -605,7 +605,7 @@ public final class BlazeRuntime {
* instance. Note, that method may recreate instance between different build
* requests, so return value should not be cached.
*/
- public ActionCache getPersistentActionCache() throws IOException {
+ public ActionCache getPersistentActionCache(Reporter reporter) throws IOException {
if (actionCache == null) {
if (OS.getCurrent() == OS.WINDOWS) {
// TODO(bazel-team): Add support for a persistent action cache on Windows.
@@ -619,7 +619,7 @@ public final class BlazeRuntime {
LOG.log(Level.WARNING, "Failed to load action cache: " + e.getMessage(), e);
LoggingUtil.logToRemote(Level.WARNING, "Failed to load action cache: "
+ e.getMessage(), e);
- getReporter().handle(
+ reporter.handle(
Event.error("Error during action cache initialization: " + e.getMessage()
+ ". Corrupted files were renamed to '" + getCacheDirectory() + "/*.bad'. "
+ "Blaze will now reset action cache data, causing a full rebuild"));
@@ -718,9 +718,10 @@ public final class BlazeRuntime {
workspace = FileSystemUtils.getWorkingDirectory(directories.getFileSystem());
workingDirectory = workspace;
}
- updateClientEnv(options.clientEnv, options.ignoreClientEnv);
loadingPhaseRunner.updatePatternEvaluator(workingDirectory.relativeTo(workspace));
+ updateClientEnv(options.clientEnv, options.ignoreClientEnv);
+
// Fail fast in the case where a Blaze command forgets to install the package path correctly.
skyframeExecutor.setActive(false);
// Let skyframe figure out if it needs to store graph edges for this build.