From be10218ec6644feb1a462658c1865c61d77faa19 Mon Sep 17 00:00:00 2001 From: Luis Fernando Pino Duque Date: Mon, 23 May 2016 14:03:55 +0000 Subject: Replace the occurrences of Constants.PRODUCT_NAME for a call to BlazeRuntime#getProductName() or a reference to TestConstants.PRODUCT_NAME for tests. This CL prepares the codebase in order to delete the constant. -- MOS_MIGRATED_REVID=122993568 --- .../com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java') 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 d118eafbaf..c542e24335 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 @@ -258,6 +258,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { private final ImmutableMap extraSkyFunctions; private final ImmutableList extraPrecomputedValues; + private final String productName; + protected SkyframeIncrementalBuildMonitor incrementalBuildMonitor = new SkyframeIncrementalBuildMonitor(); @@ -281,7 +283,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { ImmutableMap extraSkyFunctions, ImmutableList extraPrecomputedValues, boolean errorOnExternalFiles, - PathFragment blacklistedPackagePrefixesFile) { + PathFragment blacklistedPackagePrefixesFile, + String productName) { // Strictly speaking, these arguments are not required for initialization, but all current // callsites have them at hand, so we might as well set them during construction. this.evaluatorSupplier = evaluatorSupplier; @@ -312,6 +315,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { this.artifactFactory.set(skyframeBuildView.getArtifactFactory()); this.externalFilesHelper = new ExternalFilesHelper( pkgLocator, this.errorOnExternalFiles, directories); + this.productName = productName; } private ImmutableMap skyFunctions( @@ -648,6 +652,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { protected void maybeInjectPrecomputedValuesForAnalysis() { if (needToInjectPrecomputedValuesForAnalysis) { PrecomputedValue.BLAZE_DIRECTORIES.set(injectable(), directories); + PrecomputedValue.PRODUCT_NAME.set(injectable(), productName); injectBuildInfoFactories(); injectExtraPrecomputedValues(); needToInjectPrecomputedValuesForAnalysis = false; -- cgit v1.2.3