Add java_sources to the depmap-info

Review Request #1324 - Created Nov. 12, 2014 and submitted

Information
Tejal Desai
pants
43d9779...
Reviewers
pants-reviews
fkorotkov, ity, stuhood

Add java_sources to the depmap-info.

More context:
Ity added this diff long long ago https://rbcommons.com/s/twitter/r/733 to include java_sources in self.context which had some performance issues.

I went ahead and removed it https://rbcommons.com/s/twitter/r/1130.
We relied on java_sources to be already present in self.targets for depmap goal.

This diff fixes the issue where for a scala target owning java_sources, the java_target is included in depmap output under targets found.

Without this patch, the java_sources is mising from targets but is present in targets['examples/src/scala/com/pants/example/scala_with_java_sources:scala_with_java_source']['targets']

[tw-172-25-146-131 pants]$ ./pants goal depmap --depmap-project-info examples/src/scala/com/pants/example/scala_with_java_sources:
Running pants in dev mode from /Users/tdesai/projects/pants/src/python/pants/bin/pants_exe.py
{
"libraries": {},
"targets": {
"examples/src/scala/com/pants/example/scala_with_java_sources:scala_with_java_sources": {
"libraries": [
"org.scala-lang:scala-library:2.9.3"
],
"is_code_gen": false,
"targets": [
":scala-library-2.9.3",
"examples/src/java/com/pants/examples/java_sources:java_sources"
],
"roots": [
{
"source_root": "/Users/tdesai/projects/pants/examples/src/scala/com/pants/example/scala_with_java_sources",
"package_prefix": "com.pants.example.scala_with_java_sources"
}
],
"target_type": "SOURCE"
},

    "examples/src/java/com/pants/examples/java_sources:java_sources": {
        "libraries": [],
        "is_code_gen": false,
        "targets": [],
        "roots": [
            {
                "source_root": "/Users/tdesai/projects/pants/examples/src/java/com/pants/examples/java_sources",
                "package_prefix": "com.pants.examples.java_sources"
            }
        ],
        "target_type": "SOURCE"
    },
    ":scala-library-2.9.3": {
        "libraries": [],
        "is_code_gen": false,
        "targets": [],
        "roots": [],
        "target_type": "SOURCE"
    }
}

}

yes.

./pants tests/python/pants_test/tasks:depmap_integration

and
./pants tests/python/pants_test/tasks:depmap

pass

CI:
https://travis-ci.org/pantsbuild/pants/builds/40829185

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Tejal Desai
Stu Hood
Fedor Korotkov
Tejal Desai
Review request changed

Status: Closed (submitted)

Loading...