Remove stale comment.
We create a new instance of ActionGraph each time we check for conflicts.
@@ -24,6 +24,7 @@ import com.google.common.escape.Escaper;
import com.google.common.escape.Escapers;
import com.google.common.flogger.GoogleLogger;
import com.google.devtools.build.lib.actions.MutableActionGraph.ActionConflictException;
+import com.google.devtools.build.lib.bugreport.BugReport;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.packages.OutputFile;
import com.google.devtools.build.lib.skyframe.SkyframeAwareAction;
@@ -397,15 +398,19 @@ public final class Actions {
if (pathJ.getPathString().length() > pathI.getPathString().length()
&& pathJ.startsWith(pathI)) {
// TODO(b/159733792): Test this check with compressed tree artifact input.
+ // TODO(b/214351268): Remove this check.
// We ignore the artifact prefix conflict between a TreeFileArtifact and its parent
// TreeArtifact.
- // We can only have such a conflict here if:
- // 1. The TreeArtifact is generated by an ActionTemplate. And the TreeFileArtifact is
- // generated by an expanded action created at execution time from the ActionTemplate.
- // 2. This is an incremental build with invalidated configured targets. In this case,
- // the action graph contains expanded actions from previous builds and they will be
- // checked for artifact conflicts.
+ // We can only have such a conflict here if the TreeArtifact is generated by an
+ // ActionTemplate and the TreeFileArtifact is generated by an expanded action created at
+ // execution time from the ActionTemplate.
if (artifactJ.hasParent() && artifactJ.getParent().equals(artifactI)) {
+ BugReport.sendBugReport(
+ new IllegalStateException(
+ String.format(
+ "Impossible state: TreeFileArtifact %s (child of %s) shouldn't be available"
+ + " before execution",
+ artifactJ, artifactI)));
continue;
}
