diff options
author | 2016-05-23 14:03:55 +0000 | |
---|---|---|
committer | 2016-05-23 15:27:38 +0000 | |
commit | be10218ec6644feb1a462658c1865c61d77faa19 (patch) | |
tree | fd3075f8da0ebb136561fc6ecb0740582fb3af64 /src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | |
parent | 23c274dcd0174a9bf0f62f028ab62084e9ea440f (diff) |
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
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 | 7 |
1 files changed, 6 insertions, 1 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 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<SkyFunctionName, SkyFunction> extraSkyFunctions; private final ImmutableList<PrecomputedValue.Injected> extraPrecomputedValues; + private final String productName; + protected SkyframeIncrementalBuildMonitor incrementalBuildMonitor = new SkyframeIncrementalBuildMonitor(); @@ -281,7 +283,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { ImmutableMap<SkyFunctionName, SkyFunction> extraSkyFunctions, ImmutableList<PrecomputedValue.Injected> 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<SkyFunctionName, SkyFunction> 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; |