aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
diff options
context:
space:
mode:
authorGravatar Luis Fernando Pino Duque <lpino@google.com>2016-05-23 14:03:55 +0000
committerGravatar Yue Gan <yueg@google.com>2016-05-23 15:27:38 +0000
commitbe10218ec6644feb1a462658c1865c61d77faa19 (patch)
treefd3075f8da0ebb136561fc6ecb0740582fb3af64 /src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
parent23c274dcd0174a9bf0f62f028ab62084e9ea440f (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/runtime/BlazeRuntime.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java18
1 files changed, 12 insertions, 6 deletions
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 c03192c3b7..1b9d821301 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
@@ -302,7 +302,8 @@ public final class BlazeRuntime {
preprocessorFactorySupplier,
skyFunctions.build(),
precomputedValues.build(),
- customDirtinessCheckers.build());
+ customDirtinessCheckers.build(),
+ getProductName());
this.workspace = new BlazeWorkspace(
this, directories, skyframeExecutor, eventBusExceptionHandler, workspaceStatusActionFactory,
binTools);
@@ -379,7 +380,7 @@ public final class BlazeRuntime {
}
if (profiledTasks != ProfiledTaskKinds.NONE) {
Profiler.instance().start(profiledTasks, out,
- Constants.PRODUCT_NAME + " profile for " + env.getOutputBase() + " at " + new Date()
+ getProductName() + " profile for " + env.getOutputBase() + " at " + new Date()
+ ", build ID: " + buildID,
recordFullProfilerData, clock, execStartTimeNanos);
return true;
@@ -1006,7 +1007,7 @@ public final class BlazeRuntime {
}
PathFragment outputPathFragment = BlazeDirectories.outputPathFromOutputBase(
- outputBase, workspaceDirectory, startupOptions.deepExecRoot);
+ outputBase, workspaceDirectory, startupOptions.deepExecRoot, Constants.PRODUCT_NAME);
FileSystem fs = null;
for (BlazeModule module : blazeModules) {
FileSystem moduleFs = module.getFileSystem(options, outputPathFragment);
@@ -1038,7 +1039,8 @@ public final class BlazeRuntime {
BlazeDirectories directories =
new BlazeDirectories(installBasePath, outputBasePath, workspaceDirectoryPath,
- startupOptions.deepExecRoot, startupOptions.installMD5);
+ startupOptions.deepExecRoot, startupOptions.installMD5,
+ Constants.PRODUCT_NAME);
Clock clock = BlazeClock.instance();
@@ -1152,6 +1154,10 @@ public final class BlazeRuntime {
new VersionCommand());
}
+ public String getProductName() {
+ return Constants.PRODUCT_NAME;
+ }
+
/**
* A builder for {@link BlazeRuntime} objects. The only required fields are the {@link
* BlazeDirectories}, and the {@link RuleClassProvider} (except for testing). All other fields
@@ -1298,8 +1304,8 @@ public final class BlazeRuntime {
* parameters.
*/
public Builder setDirectories(Path installBase, Path outputBase,
- Path workspace) {
- this.directories = new BlazeDirectories(installBase, outputBase, workspace);
+ Path workspace, String productName) {
+ this.directories = new BlazeDirectories(installBase, outputBase, workspace, productName);
return this;
}