diff options
author | 2015-09-17 11:36:43 +0000 | |
---|---|---|
committer | 2015-09-17 19:33:42 +0000 | |
commit | 59dbf684fbba5b6f3a99cd1761dd7c7f5cf69a3e (patch) | |
tree | 44e288c9e2d9f149f017923f7a2b078734c30647 /src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java | |
parent | 88f643c422b018716ac9f228f8aeda64b4e27897 (diff) |
Simplify BuildView construction and store configurations in the build result.
I was persuing the idea that BuildView could become stateless. While that
should be possible, we're currently still relying on minimal state in
BuildView (from tests at least) in a way that makes it tricky to remove.
Instead, I'm now trying to move the BuildView into CommandEnvironment, and
create a new one as needed (only for build commands); that makes it safe in the
presence of concurrently running commands, as long as they don't use the same
BuildView instace. (Of course, allowing commands to run concurrently will need
more changes outside of BuildView.)
--
MOS_MIGRATED_REVID=103279370
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java | 3 |
1 files changed, 1 insertions, 2 deletions
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 67b769cf43..65a63ec1d8 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 @@ -211,8 +211,7 @@ public class RunCommand implements BlazeCommand { if (configuration == null) { // The target may be an input file, which doesn't have a configuration. In that case, we // choose any target configuration. - configuration = runtime.getView().getConfigurationCollection() - .getTargetConfigurations().get(0); + configuration = result.getBuildConfigurationCollection().getTargetConfigurations().get(0); } Path workingDir; try { |