Skip to content

Commit

Permalink
Print children in ArtifactNestedSetKey#toString.
Browse files Browse the repository at this point in the history
The old #toString method was only a placeholder that didn't offer much
information.

RELNOTES: None
PiperOrigin-RevId: 282559367
  • Loading branch information
joeleba authored and copybara-github committed Nov 26, 2019
1 parent bbcad60 commit 1cbf35e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}

/**
Expand Down

0 comments on commit 1cbf35e

Please sign in to comment.