From 806130233d4d190dbfaf6a28feb84eb5a010f1c7 Mon Sep 17 00:00:00 2001 From: Ulf Adams Date: Wed, 16 Sep 2015 09:11:33 +0000 Subject: Change most calls to BlazeRuntime.getReporter() to use CommandEnvironment. -- MOS_MIGRATED_REVID=103175472 --- .../java/com/google/devtools/build/lib/runtime/BlazeRuntime.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java') 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. -- cgit v1.2.3