7699c5dcdb3cfbb8050581aed2f2eb7a5cc99579,src/python/pants/backend/codegen/targets/java_protobuf_library.py,JavaProtobufLibrary,imports,#JavaProtobufLibrary#,67

Before Change


      address = SyntheticAddress.parse(spec, relative_to=self.address.spec_path)
      target = self._build_graph.get_target(address)
      if target:
        target.walk(add_jars, predicate=lambda tgt: tgt.is_jar_library)
    self._imports = set(import_jars)
    return self._imports

After Change


      for spec in libraries:
        address = SyntheticAddress.parse(spec, relative_to=self.address.spec_path)
        target = self._build_graph.get_target(address)
        if isinstance(target, (JarLibrary, JvmTarget)):
          import_jars.update(target.jar_dependencies)
        else:
          raise self.PrematureImportPokeError(
              "{address}: Failed to resolve import "{spec}".".format(
                  address=self.address.spec,
                  spec=address.spec))
      self._imports = import_jars
    return self._imports
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pantsbuild/pants
Commit Name: 7699c5dcdb3cfbb8050581aed2f2eb7a5cc99579
Time: 2014-08-08
Author: garrett.malmquist@gmail.com
File Name: src/python/pants/backend/codegen/targets/java_protobuf_library.py
Class Name: JavaProtobufLibrary
Method Name: imports


Project Name: pantsbuild/pants
Commit Name: 461bb39fbdd9f49ff21a6be038ffbd2e7ae622b0
Time: 2015-07-30
Author: mateorod9@gmail.com
File Name: src/python/pants/backend/android/tasks/dx_compile.py
Class Name: DxCompile
Method Name: execute


Project Name: pantsbuild/pants
Commit Name: 40c214aa1c044a02b5290aa3ec7cc9570dbe24ad
Time: 2016-11-06
Author: stuhood@gmail.com
File Name: src/python/pants/engine/legacy/graph.py
Class Name: LegacyBuildGraph
Method Name: _index