[engine] When requesting select nodes or regular nodes, return state values rather than requiring a separate call

Review Request #4261 - Created Sept. 26, 2016 and submitted

Information
Nick Howard (Twitter)
pants
3904
Reviewers
pants-reviews
jsirois, kwlzn, stuhood, yujiec

Currently, when ever a selector is being resolved, the node calls StepContext#select_node and then StepContext#get with the result without doing much with the node value. The same is also somewhat true of gen_nodes.

This replaces usages of select_node and get with select_for, which returns just the state.
It also replaces gen_nodes and get with get_nodes_and_states_for.

The other structural change is that DependenciesNode now iterates over the subject-variant tuples instead of the nodes generated.

The motivation here is to move away from exposing nodes for selectors to the node implementations.

Ran engine tests locally. CI away on the PR.

Stu Hood
Nick Howard (Twitter)
Nick Howard (Twitter)
Nick Howard (Twitter)
Kris Wilson
Yujie Chen
Nick Howard (Twitter)
Nick Howard (Twitter)
Nick Howard (Twitter)
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as https://github.com/pantsbuild/pants/commit/da4d0d106d1849a2d745cf89977cd587b107ae68
Loading...