[engine] Support for synthetic target injection

Review Request #3738 — Created April 21, 2016 and submitted — Latest diff uploaded

3226, 3243
gmalmquist, patricklaw, peiyu, wisechengyi

In order to ship build graph caching before shipping support for codegen and other synthetic target injection tasks, we needed to add support to legacy/graph.py for injecting synthetic targets.

  • Move support for injecting synthetic targets back to the base class, see it is accomplished the same way by either implementation
  • Add support for traversable_(dependency_)?specs
  • In the legacy:dependencies impl, dump the transitive closure of targets rather than the visited addresses (the two are different in the presence of traversable_(dependency_)?specs)
  • Confirmed in the legacy:dependencies integration test that we get the synthetic scala target.