2d515b55b25a62b1f5961955e977e2fce4ae511e,src/python/pants/backend/jvm/tasks/jvm_dependency_analyzer.py,JvmDependencyAnalyzer,targets_by_file,#JvmDependencyAnalyzer#,48
Before Change
// Compute class -> target.
self.context.log.debug("Mapping classes...")
classes_by_target = self.context.products.get_data("classes_by_target")
for tgt, target_products in classes_by_target.items():
for classes_dir, classes in target_products.rel_paths():
for cls in classes:
targets_by_file[cls].add(tgt)
targets_by_file[os.path.join(classes_dir, cls)].add(tgt)
// Compute jar -> target.
self.context.log.debug("Mapping jars...")
compile_classpath = self.context.products.get_data("compile_classpath")
for jar_lib in self.context.targets(lambda t: isinstance(t, JarLibrary)):
for _, artifact_path in compile_classpath.get_for_target(jar_lib, transitive=False):
After Change
self.context.log.debug("Mapping classpath...")
for target in self.context.targets():
// Classpath content.
files = ClasspathUtil.classpath_contents((target,), runtime_classpath, transitive=False)
// And jars; for binary deps, zinc doesn"t emit precise deps (yet).
cp_entries = ClasspathUtil.classpath_entries((target,), runtime_classpath, transitive=False)
jars = [cpe for cpe in cp_entries if ClasspathUtil.is_jar(cpe)]
for coll in [files, jars]:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: pantsbuild/pants
Commit Name: 2d515b55b25a62b1f5961955e977e2fce4ae511e
Time: 2015-10-06
Author: stuhood@gmail.com
File Name: src/python/pants/backend/jvm/tasks/jvm_dependency_analyzer.py
Class Name: JvmDependencyAnalyzer
Method Name: targets_by_file
Project Name: pantsbuild/pants
Commit Name: 2d515b55b25a62b1f5961955e977e2fce4ae511e
Time: 2015-10-06
Author: stuhood@gmail.com
File Name: src/python/pants/backend/jvm/tasks/detect_duplicates.py
Class Name: DuplicateDetector
Method Name: _get_internal_dependencies
Project Name: pantsbuild/pants
Commit Name: 2d515b55b25a62b1f5961955e977e2fce4ae511e
Time: 2015-10-06
Author: stuhood@gmail.com
File Name: src/python/pants/backend/jvm/tasks/jvm_dependency_analyzer.py
Class Name: JvmDependencyAnalyzer
Method Name: targets_by_file
Project Name: pantsbuild/pants
Commit Name: 2d515b55b25a62b1f5961955e977e2fce4ae511e
Time: 2015-10-06
Author: stuhood@gmail.com
File Name: src/python/pants/backend/jvm/tasks/junit_run.py
Class Name: _JUnitRunner
Method Name: _calculate_tests_from_targets