bfb1453dd22fd12c69e314e0995499e3f4835614,src/python/twitter/pants/tasks/jvm_task.py,JvmTask,classpath,#JvmTask#Any#Any#,25

Before Change



    // TODO(John Sirois): undo cheeseball! - derive src/resources from target attribute and then
    // later fix tests to declare their resources as well?
    classpath.extend(os.path.join(get_buildroot(), path)
                     for path in ("src/resources", "tests/resources"))

    return classpath

After Change


    // be their own target libraries or tests then depend on:
    // http://jira.local.twitter.com/browse/AWESOME-108
    bases = set()
    for target in self.context.targets():
      if isinstance(target, JvmTarget) and (is_test(target) or hasattr(target, "resources")):
        if target.target_base not in bases:
          sibling_resources_base = os.path.join(os.path.dirname(target.target_base), "resources")
          classpath.append(os.path.join(get_buildroot(), sibling_resources_base))
          bases.add(target.target_base)

    return classpath
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: pantsbuild/pants
Commit Name: bfb1453dd22fd12c69e314e0995499e3f4835614
Time: 2012-10-31
Author: jsirois@twitter.com
File Name: src/python/twitter/pants/tasks/jvm_task.py
Class Name: JvmTask
Method Name: classpath


Project Name: HazyResearch/fonduer
Commit Name: b9dc15ecef0393a55a953acff3c1d0278b19d9f5
Time: 2018-09-01
Author: lwhsiao@stanford.edu
File Name: src/fonduer/utils/utils_udf.py
Class Name:
Method Name: get_sparse_matrix


Project Name: home-assistant/home-assistant
Commit Name: 2a210607d392cac85bb82dd576877ddb192c85c5
Time: 2018-08-16
Author: prokhorov.max@outlook.com
File Name: homeassistant/components/wemo.py
Class Name:
Method Name: setup