Remove ArtifactFactory dependency on incorrect exec root
Somewhat trickily, this changes the execRoot field from referring to
[output_base]/execroot/wsname (not really the exec root) to
[output_base]/execroot (actually the execroot).
Progress on #1681.
--
MOS_MIGRATED_REVID=131286181
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
index fed47ee..9078f96 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
@@ -483,7 +483,7 @@
skyframeAnalysisResult =
skyframeBuildView.configureTargets(
eventHandler, topLevelCtKeys, aspectKeys, eventBus, viewOptions.keepGoing);
- setArtifactRoots(skyframeAnalysisResult.getPackageRoots(), configurations);
+ setArtifactRoots(skyframeAnalysisResult.getPackageRoots());
} finally {
skyframeBuildView.clearInvalidatedConfiguredTargets();
}
@@ -818,8 +818,7 @@
* paths with unknown roots to artifacts.
*/
@VisibleForTesting // for BuildViewTestCase
- public void setArtifactRoots(ImmutableMap<PackageIdentifier, Path> packageRoots,
- BuildConfigurationCollection configurations) {
+ public void setArtifactRoots(ImmutableMap<PackageIdentifier, Path> packageRoots) {
Map<Path, Root> rootMap = new HashMap<>();
Map<PackageIdentifier, Root> realPackageRoots = new HashMap<>();
for (Map.Entry<PackageIdentifier, Path> entry : packageRoots.entrySet()) {
@@ -832,19 +831,6 @@
}
// Source Artifact roots:
getArtifactFactory().setPackageRoots(realPackageRoots);
-
- // Derived Artifact roots:
- ImmutableList.Builder<Root> roots = ImmutableList.builder();
-
- // build-info.txt and friends; this root is not configuration specific.
- roots.add(directories.getBuildDataDirectory());
-
- // The roots for each configuration - duplicates are automatically removed in the call below.
- for (BuildConfiguration cfg : configurations.getAllConfigurations()) {
- roots.addAll(cfg.getRoots());
- }
-
- getArtifactFactory().setDerivedArtifactRoots(roots.build());
}
/**