diff options
author | 2018-02-23 12:23:56 -0800 | |
---|---|---|
committer | 2018-02-23 12:25:25 -0800 | |
commit | 9f7eb09e53ed7720a5e0b038df67263e44c28101 (patch) | |
tree | bbecf5e070d191a7349d339fbdd6f75226fc1bef /src/main/java/com/google/devtools/build/lib/skyframe | |
parent | 054cf789556c36181196be391d47344186283bb5 (diff) |
Fix Fix crash on incremental builds across configuration changes when using Skyframe native Filesets which reference output files.
We were failing to override equality of Artifact to use the artifact owner. See the javadocs on ArtifactSkyKey for more discussion of this.
Before this change, the weak interning of keys done in LegacySkyKey and FilesetEntryKey spuriously matched keys across incremental builds in cases where Artifacts differed only in their owner.
PiperOrigin-RevId: 186805663
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/ArtifactSkyKey.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ArtifactSkyKey.java b/src/main/java/com/google/devtools/build/lib/skyframe/ArtifactSkyKey.java index dd3aa91fea..96b8d1666f 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/ArtifactSkyKey.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/ArtifactSkyKey.java @@ -111,10 +111,6 @@ public class ArtifactSkyKey implements SkyKey { return TO_ARTIFACT.apply((ArtifactSkyKey) key.argument()); } - public static boolean equalWithOwner(Artifact first, Artifact second) { - return first.equals(second) && first.getArtifactOwner().equals(second.getArtifactOwner()); - } - @Override public SkyFunctionName functionName() { return SkyFunctions.ARTIFACT; @@ -159,7 +155,7 @@ public class ArtifactSkyKey implements SkyKey { return false; } ArtifactSkyKey thatArtifactSkyKey = ((ArtifactSkyKey) that); - return equalWithOwner(artifact, thatArtifactSkyKey.artifact) + return Artifact.equalWithOwner(artifact, thatArtifactSkyKey.artifact) && isMandatory == thatArtifactSkyKey.isMandatory; } |