enough-analyst-54434
09/25/2017, 10:11 PM$ git log -Sjar_dependency_utils
commit b7cd335efae0290caf4cafff4eac77aebfc9344a
Author: Benjy Weinberger <benjyw@gmail.com>
Date: Sat Mar 18 23:05:06 2017 +0200
Fix missing and circular deps. (#4345)
The main fixes are:
- Move jar_dependency*.py and exclude.py out of the JVM backend
and into core (specifically, the already existing pants.java.jar
package, which seems like a logical place).
- Move a utility function from classpath_util.py to classpath_products.py
(and change the corresponding tests appropriately).
- A few random missing deps noticed along the way.
These changes, while intrusive, are necessary to fix the dep cycles
mentioned in the issue below. Fortunately they are also quite logical:
In particular, since JarDependency is not a target, it makes sense for
it to live outside pants.backend.jvm.targets. And moving it into core
paves the way for using JVM-based tools in non-JVM backends without
having to depend on the entire JVM backend (e.g., python ANTLR codegen
needs to run a JVM, but doesn't care about JVM source code in the repo).
Addresses <https://github.com/pantsbuild/pants/issues/4138>.
$ git diff --stat b7cd335efae0290caf4cafff4eac77aebfc9344a^! | grep _utils
src/python/pants/backend/jvm/ivy_utils.py | 8 +-
.../jvm => java/jar}/jar_dependency_utils.py | 0
.../pants_test/backend/jvm/tasks/test_ivy_utils.py | 6 +-
.../backend/jvm/test_jar_dependency_utils.py | 2 +-