use of com.facebook.buck.rules.TargetGraphAndTargetNodes in project buck by facebook.
the class TargetsCommand method computeShowTargetHash.
private void computeShowTargetHash(CommandRunnerParams params, ListeningExecutorService executor, TargetGraphAndTargetNodes targetGraphAndTargetNodes, Map<BuildTarget, ShowOptions.Builder> showRulesResult) throws IOException, InterruptedException, BuildFileParseException, BuildTargetException, CycleException {
LOG.debug("Getting target hash for %s", targetGraphAndTargetNodes.getTargetNodes());
TargetGraphAndTargetNodes targetGraphAndNodesWithTests = computeTargetsAndGraphToShowTargetHash(params, executor, targetGraphAndTargetNodes);
TargetGraph targetGraphWithTests = targetGraphAndNodesWithTests.getTargetGraph();
FileHashLoader fileHashLoader = createOrGetFileHashLoader(params);
// Hash each target's rule description and contents of any files.
ImmutableMap<BuildTarget, HashCode> buildTargetHashes = new TargetGraphHashing(params.getBuckEventBus(), targetGraphWithTests, fileHashLoader, targetGraphAndNodesWithTests.getTargetNodes()).setNumThreads(params.getBuckConfig().getNumThreads()).hashTargetGraph();
ImmutableMap<BuildTarget, HashCode> finalHashes = rehashWithTestsIfNeeded(targetGraphWithTests, targetGraphAndTargetNodes.getTargetNodes(), buildTargetHashes);
for (TargetNode<?, ?> targetNode : targetGraphAndTargetNodes.getTargetNodes()) {
processTargetHash(targetNode.getBuildTarget(), showRulesResult, finalHashes);
}
}
Aggregations