API Change: Move graph walking out of classpath_(util|products)

Review Request #3036 - Created Oct. 24, 2015 and submitted

Stu Hood
jsirois, nhoward_tw

This patch removes all transitivity from classpath_util and classpath_products, in favor of doing external graph walks and then requesting products explicitly per target. This helps to separate concerns, rather than having APIs to specify walk modes living outside of the build_graph package.

One other thing this helps to do is make it more obvious where we are mixing classpaths for targets. There are still a few cases (junit, checkstyle, etc) where we collect a classpath for targets from potentially-disjoint subgraphs. And in those cases, you now need to do an explicit collection and merger of the classpath per target.

  • Remove the transitive flag everywhere in classpath_util and classpath_products; do not walk.
  • In checkstyle, only compute the classpath for relevant targets

The one awkward bit that I should call out is that jvm_target.excludes are still applied transitively by collecting all excludes below the target. But I expect that the right way to fix that in the long term will be to deprecate excludes in favor of deploy_excludes. Would be willing to do that here if we agree.



  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Stu Hood
Stu Hood
John Sirois
Nick Howard (Twitter)
Stu Hood
Stu Hood
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 5933b1eb1ffb96ac36a18ffa27c0f17095c3dd6b

Eric Ayers


Removing this parameter broke some of our plugins. ClasspathProducts is not just internal, it is used in plugins so we will eventually need to start treating it as an API.