diff --git a/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSet.java b/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSet.java index c8d05a2fccfe3c..e21e4778a75af1 100644 --- a/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSet.java +++ b/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSet.java @@ -381,7 +381,7 @@ public String toString() { } // TODO: this leaves LINK_ORDER backwards - private static String childrenToString(Object children) { + public static String childrenToString(Object children) { if (children instanceof Object[]) { return Arrays.stream((Object[]) children) .map(NestedSet::childrenToString) diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ArtifactNestedSetKey.java b/src/main/java/com/google/devtools/build/lib/skyframe/ArtifactNestedSetKey.java index 64aa236be75f9e..1437850289b630 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/ArtifactNestedSetKey.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/ArtifactNestedSetKey.java @@ -13,9 +13,11 @@ // limitations under the License. package com.google.devtools.build.lib.skyframe; +import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.devtools.build.lib.actions.Artifact; +import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.skyframe.SkyFunctionName; import com.google.devtools.build.skyframe.SkyKey; import java.util.Arrays; @@ -74,7 +76,9 @@ public boolean equals(Object that) { @Override public String toString() { - return rawChildren.toString(); + return MoreObjects.toStringHelper(this) + .add("rawChildren", NestedSet.childrenToString(rawChildren)) + .toString(); } /**