aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2018-07-17 16:40:58 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-07-17 16:42:50 -0700
commitf309ad3be36363070e87eef0ee04b12f4956d601 (patch)
treedb154ca3e5b54bb4470ea9b5d071dd17f33c927c /src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java
parentceafeaef5977d0671c44c86864b9a4b2b0e5ee04 (diff)
Automated rollback of commit d491bf10f42e213292382c98a1dc439537f00f43.
*** Reason for rollback *** Still bugs lurking. See linked bug. *** Original change description *** Automated rollback of commit eb587075b0d6ffab1cf9e69ede1b7e547905e547. *** Reason for rollback *** Depot has been fixed. RELNOTES[INC]: If the same artifact is generated by two distinct but identical actions, and a downstream action has both those actions' outputs in its inputs, the artifact will now appear twice in the downstream action's inputs. If this causes problems in Skylark actions, you can use the uniquify=True argument in Args.add_args. PiperOrigin-RevId: 204997569
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java b/src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java
index fca7d2218c..703611fd27 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java
@@ -26,7 +26,6 @@ import com.google.devtools.build.lib.util.Fingerprint;
import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.lib.vfs.Root;
import com.google.devtools.build.lib.vfs.RootedPath;
-import java.util.Objects;
import javax.annotation.Nullable;
/**
@@ -112,7 +111,9 @@ public interface FilesetTraversalParams {
if (o instanceof FilesetTraversalParams.DirectTraversalRoot) {
FilesetTraversalParams.DirectTraversalRoot that =
(FilesetTraversalParams.DirectTraversalRoot) o;
- return Objects.equals(this.getOutputArtifact(), that.getOutputArtifact())
+ // Careful! We must compare the artifact owners, which the default {@link Artifact#equals()}
+ // method does not do. See the comments on {@link ArtifactSkyKey} and http://b/73738481.
+ return Artifact.equalWithOwner(this.getOutputArtifact(), that.getOutputArtifact())
&& (this.getRootPart().equals(that.getRootPart()))
&& (this.getRelativePart().equals(that.getRelativePart()));
}