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: 9

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: cornellius-gp/gpytorch
Commit Name: 47a96974ab2d75fc20c76a6d6da20976ecad32bb
Time: 2017-10-02
Author: gpleiss@gmail.com
File Name: gpytorch/random_variables/random_variable.py
Class Name: RandomVariable
Method Name: cuda


Project Name: cornellius-gp/gpytorch
Commit Name: 47a96974ab2d75fc20c76a6d6da20976ecad32bb
Time: 2017-10-02
Author: gpleiss@gmail.com
File Name: gpytorch/random_variables/random_variable.py
Class Name: RandomVariable
Method Name: cpu