diff options
author | 2015-04-17 09:57:13 +0000 | |
---|---|---|
committer | 2015-04-17 15:40:54 +0000 | |
commit | 3e071282b5919f781f6211b671941dad9ee69625 (patch) | |
tree | 951355ebc59cc5ecc0606df72cd9b84c91aeb06a /src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | |
parent | 4d4555f135762015a68417339f81df6cd518c742 (diff) |
Remove the full client environment from BuildConfiguration in favor of computing the test environment as early as possible, and passing that along.
--
MOS_MIGRATED_REVID=91388451
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java index e3e954f434..fd170a1f95 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java @@ -230,7 +230,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { new SkyframeIncrementalBuildMonitor(); private MutableSupplier<ConfigurationFactory> configurationFactory = new MutableSupplier<>(); - private MutableSupplier<Map<String, String>> clientEnv = new MutableSupplier<>(); + private MutableSupplier<Map<String, String>> testEnv = new MutableSupplier<>(); private MutableSupplier<ImmutableList<ConfigurationFragmentFactory>> configurationFragments = new MutableSupplier<>(); private MutableSupplier<Set<Package>> configurationPackages = new MutableSupplier<>(); @@ -316,7 +316,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { map.put(SkyFunctions.POST_CONFIGURED_TARGET, new PostConfiguredTargetFunction(new BuildViewProvider())); map.put(SkyFunctions.CONFIGURATION_COLLECTION, new ConfigurationCollectionFunction( - configurationFactory, clientEnv, configurationPackages)); + configurationFactory, testEnv, configurationPackages)); map.put(SkyFunctions.CONFIGURATION_FRAGMENT, new ConfigurationFragmentFunction( configurationFragments, configurationPackages)); map.put(SkyFunctions.WORKSPACE_FILE, new WorkspaceFileFunction(pkgFactory, directories)); @@ -864,18 +864,14 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { throws InvalidConfigurationException, InterruptedException { this.configurationPackages.set(Sets.<Package>newConcurrentHashSet()); - this.clientEnv.set(configurationKey.getClientEnv()); + this.testEnv.set(configurationKey.getTestEnv()); this.configurationFactory.set(configurationFactory); this.configurationFragments.set(ImmutableList.copyOf(configurationFactory.getFactories())); - BuildOptions buildOptions = configurationKey.getBuildOptions(); - Map<String, String> testEnv = BuildConfiguration.getTestEnv( - buildOptions.get(BuildConfiguration.Options.class).testEnvironment, - configurationKey.getClientEnv()); // TODO(bazel-team): find a way to use only BuildConfigurationKey instead of // TestEnvironmentVariables and BlazeDirectories. There is a problem only with // TestEnvironmentVariables because BuildConfigurationKey stores client environment variables // and we don't want to rebuild everything when any variable changes. - PrecomputedValue.TEST_ENVIRONMENT_VARIABLES.set(injectable(), testEnv); + PrecomputedValue.TEST_ENVIRONMENT_VARIABLES.set(injectable(), configurationKey.getTestEnv()); PrecomputedValue.BLAZE_DIRECTORIES.set(injectable(), configurationKey.getDirectories()); SkyKey skyKey = ConfigurationCollectionValue.key(configurationKey.getBuildOptions(), |