Remove the classes_by_target and resources_by_target products

Review Request #2928 - Created Oct. 5, 2015 and submitted

Information
Stu Hood
pants
2311
e66425e...
Reviewers
pants-reviews
jsirois, nhoward_tw, zundel

This is a 99% working patch to remove classes_by_target and resources_by_target. I also needed to split compile_classpath (pre-compile) from runtime_classpath (post-compile) in order to allow the ResourceTask subclasses to expose a unique product that wouldn't cycle between themselves or compilation.

  • Add runtime_classpath which clones the compile_classpath and adds compiled classes and resources
  • Expand ClasspathUtil to allow walking classpath contents (optionally transitively)
  • Remove classes_by_target and resources_by_target from all tasks, in favor of adding classpath entries
  • Skip jvm_dependency_check by default (since the previous default checked for an impossible condition in the presence of isolation)
  • Fix a bug in jvm_dependency_usage tests by setting target roots in the context
  • Delete ResourceMapping, since it was only used to register resources which were already being written into a target's classpath
  • Replace "fake" classes_by_target deps with real runtime_classpath deps in cases where targets need a runtime classpath
  • Adapt ResourceTask to cache_target_dirs and drop unnecessary relative_resource_paths
  • dx_compile now passes classpath entries directly to the dex tool (since it supports consuming jars/zips/directories directly)

https://github.com/pantsbuild/pants/pull/2311

Issues

  • 0
  • 5
  • 1
  • 6
Description From Last Updated
Stu Hood
Stu Hood
John Sirois
Stu Hood
Stu Hood
John Sirois
Patrick Lawson
Stu Hood
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 2d515b55b25a62b1f5961955e977e2fce4ae511e

Eric Ayers

   

Note that runtime_classpath now contains JarLibrary targets. Before we only gathered classes compiled in the repo. See https://github.com/pantsbuild/pants/issues/2359 and and attempt to fix this in https://rbcommons.com/s/twitter/r/2962

Loading...