From 86da8f574e27659328af5a92e54d855565b30916 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Mon, 26 Jan 2026 22:34:31 +0100 Subject: [PATCH] Use pretty aspect class names in errors Previously, the default `toString()` implementation was used, printing the full class name and hash code. --- .../devtools/build/lib/skyframe/AspectKeyCreator.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/AspectKeyCreator.java b/src/main/java/com/google/devtools/build/lib/skyframe/AspectKeyCreator.java index c05550344344bc..a217836404f9c1 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/AspectKeyCreator.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/AspectKeyCreator.java @@ -19,6 +19,7 @@ import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Lists; import com.google.devtools.build.lib.actions.ActionLookupKey; import com.google.devtools.build.lib.analysis.config.BuildConfigurationValue; import com.google.devtools.build.lib.cmdline.Label; @@ -44,7 +45,7 @@ private AspectKeyCreator() {} public static AspectKey createAspectKey( AspectDescriptor aspectDescriptor, ConfiguredTargetKey baseConfiguredTargetKey) { return createAspectKey( - aspectDescriptor, /*baseKeys=*/ ImmutableList.of(), baseConfiguredTargetKey); + aspectDescriptor, /* baseKeys= */ ImmutableList.of(), baseConfiguredTargetKey); } public static AspectKey createAspectKey( @@ -375,7 +376,9 @@ public Label getLabel() { String getDescription() { return String.format( "%s with parameters %s on %s", - topLevelAspectsClasses, topLevelAspectsParameters, targetLabel); + Lists.transform(topLevelAspectsClasses, AspectClass::getName), + topLevelAspectsParameters, + targetLabel); } @Override