2d515b55b25a62b1f5961955e977e2fce4ae511e,src/python/pants/backend/jvm/tasks/jvm_dependency_analyzer.py,JvmDependencyAnalyzer,targets_by_file,#JvmDependencyAnalyzer#,48

Before Change



    // 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):
        targets_by_file[artifact_path].add(jar_lib)
        if artifact_path.endswith(".jar"):

After Change


      // 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]:
        for f in coll:
          targets_by_file[f].add(target)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: 86fcbabefdaff591da5191a8a506beec9b24538b
Time: 2019-07-29
Author: hfuller@twitter.com
File Name: src/python/pants/backend/jvm/tasks/jvm_dependency_check.py
Class Name: JvmDependencyCheck
Method Name: execute


Project Name: pantsbuild/pants
Commit Name: b5d41dacd073b4b3cc70e07d2244f9993dba7bee
Time: 2019-07-26
Author: hfuller@twitter.com
File Name: src/python/pants/backend/jvm/tasks/jvm_dependency_check.py
Class Name: JvmDependencyCheck
Method Name: execute