Skip to content

Commit

Permalink
Fix the dump command to handle alias targets.
Browse files Browse the repository at this point in the history
RELNOTES: None.
PiperOrigin-RevId: 239348776
  • Loading branch information
ahumesky authored and copybara-github committed Mar 20, 2019
1 parent fc69ecd commit c4d9b9b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import com.google.devtools.build.lib.packages.AspectDescriptor;
import com.google.devtools.build.lib.query2.AqueryActionFilter;
import com.google.devtools.build.lib.query2.AqueryUtils;
import com.google.devtools.build.lib.rules.AliasConfiguredTarget;
import com.google.devtools.build.lib.skyframe.AspectValue;
import com.google.devtools.build.lib.skyframe.ConfiguredTargetValue;
import java.util.HashMap;
Expand Down Expand Up @@ -142,6 +143,10 @@ private void dumpSingleAction(ConfiguredTarget configuredTarget, ActionAnalysisM
return;
}

while (configuredTarget instanceof AliasConfiguredTarget) {
configuredTarget = ((AliasConfiguredTarget) configuredTarget).getActual();
}

Preconditions.checkState(configuredTarget instanceof RuleConfiguredTarget);
RuleConfiguredTarget ruleConfiguredTarget = (RuleConfiguredTarget) configuredTarget;
AnalysisProtos.Action.Builder actionBuilder =
Expand Down

0 comments on commit c4d9b9b

Please sign in to comment.