Skip to content

Commit

Permalink
Remove some dead code.
Browse files Browse the repository at this point in the history
The cast to Label can never succeed for a configured target node, so this
code could never have been executed (or we'd see crashes at this location).

--
MOS_MIGRATED_REVID=119615022
  • Loading branch information
ulfjack authored and dslomov committed Apr 12, 2016
1 parent d9a644f commit 6f26035
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,17 +391,7 @@ private static Label maybeGetConfiguredTargetCycleCulprit(
if (culprit.functionName().equals(SkyFunctions.CONFIGURED_TARGET)) {
return ((ConfiguredTargetKey) culprit.argument()).getLabel();
} else {
// For other types of cycles (e.g. file symlink cycles), the root cause is the furthest
// target dependency that itself depended on the cycle.
Label furthestTarget = labelToLoad;
for (SkyKey skyKey : cycleInfo.getPathToCycle()) {
if (skyKey.functionName().equals(SkyFunctions.CONFIGURED_TARGET)) {
furthestTarget = (Label) skyKey.argument();
} else {
break;
}
}
return furthestTarget;
return labelToLoad;
}
}
return null;
Expand Down

0 comments on commit 6f26035

Please sign in to comment.