{"action":"closed","number":1299,"pull_request":{"url":"https://api.github.com/repos/pantsbuild/pants/pulls/1299","id":31647895,"html_url":"https://github.com/pantsbuild/pants/pull/1299","diff_url":"https://github.com/pantsbuild/pants/pull/1299.diff","patch_url":"https://github.com/pantsbuild/pants/pull/1299.patch","issue_url":"https://api.github.com/repos/pantsbuild/pants/issues/1299","number":1299,"state":"closed","locked":false,"title":"Example of issue with annotation processors that have 3rdparty deps","user":{"login":"ericzundel","id":119728,"avatar_url":"https://avatars.githubusercontent.com/u/119728?v=3","gravatar_id":"","url":"https://api.github.com/users/ericzundel","html_url":"https://github.com/ericzundel","followers_url":"https://api.github.com/users/ericzundel/followers","following_url":"https://api.github.com/users/ericzundel/following{/other_user}","gists_url":"https://api.github.com/users/ericzundel/gists{/gist_id}","starred_url":"https://api.github.com/users/ericzundel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericzundel/subscriptions","organizations_url":"https://api.github.com/users/ericzundel/orgs","repos_url":"https://api.github.com/users/ericzundel/repos","events_url":"https://api.github.com/users/ericzundel/events{/privacy}","received_events_url":"https://api.github.com/users/ericzundel/received_events","type":"User","site_admin":false},"body":"This PR demonstrates an issue that we are seeing in our repo with annotation processors in pants.  To reproduce, patch this in and run:\r\n\r\n```\r\n$  ./pants clean-all\r\n$  ./pants compile testprojects/src/java/com/pants/testproject/annotation/processorwithdep::\r\n...\r\nSUCCESS\r\n```\r\n\r\nNow, compile some code that depends on an unrelated annotation processor:\r\n\r\n```\r\n$  ./pants compile ./examples/src/java/org/pantsbuild/example/annotation::\r\n...\r\n16:04:43 00:01           [jmake]\r\n                         error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider com.pants.testproject.annotation.processorwithdep.processor.ProcessorWithDep could not be instantiated: java.lang.NoClassDefFoundError: com/squareup/javapoet/TypeSpec\r\n\r\n```\r\n\r\nThe issue is that we are leaving all annotation processors ever encountered configured in Pants to be run with all subsequent runs. \r\n\r\n```\r\n$ cat .pants.d/compile/jvm/apt/apt-processor-info-global/META-INF/services/javax.annotation.processing.Processor\r\ncom.pants.testproject.annotation.processor.ResourceMappingProcessor\r\ncom.pants.testproject.annotation.processorwithdep.processor.ProcessorWithDep\r\ncom.pants.examples.annotation.processor.ExampleProcessor\r\n```\r\n\r\nFirst of all, For that to work properly, the 3rdparty deps for the annotation processors must be on the classpath for the apt run of the compiler.  Second, I'm not sure that is what the caller intended - maybe we should configure the annotation processors fresh for each time the annotation processors run with only the processors in the transitive closure of dependencies.\r\n\r\nThe example isn't strictly necessary.  The testprojects annotation processor example already has  a guava dep in it,  so if you run that one first, then the one under `examples/src/java/com/pants/examples/annotation/` that will suffice to reproduce the issue.  However, this sample annotation processor has a 3rdparty dep that is unlikely to be on the classpath and also creates source code so it might be good at exercising other things for pants.\r\n\r\n","created_at":"2015-03-20T20:13:37Z","updated_at":"2015-09-08T20:26:34Z","closed_at":"2015-09-08T20:26:34Z","merged_at":null,"merge_commit_sha":"9b8c56af20f9caaf52d0fde5b0a1b4e0acbf55db","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pantsbuild/pants/pulls/1299/commits","review_comments_url":"https://api.github.com/repos/pantsbuild/pants/pulls/1299/comments","review_comment_url":"https://api.github.com/repos/pantsbuild/pants/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pantsbuild/pants/issues/1299/comments","statuses_url":"https://api.github.com/repos/pantsbuild/pants/statuses/c339740050984021e727b83f8bf4a7489cb94216","head":{"label":"ericzundel:zundel/annotation-processor-with-thirdparty-dep","ref":"zundel/annotation-processor-with-thirdparty-dep","sha":"c339740050984021e727b83f8bf4a7489cb94216","user":{"login":"ericzundel","id":119728,"avatar_url":"https://avatars.githubusercontent.com/u/119728?v=3","gravatar_id":"","url":"https://api.github.com/users/ericzundel","html_url":"https://github.com/ericzundel","followers_url":"https://api.github.com/users/ericzundel/followers","following_url":"https://api.github.com/users/ericzundel/following{/other_user}","gists_url":"https://api.github.com/users/ericzundel/gists{/gist_id}","starred_url":"https://api.github.com/users/ericzundel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericzundel/subscriptions","organizations_url":"https://api.github.com/users/ericzundel/orgs","repos_url":"https://api.github.com/users/ericzundel/repos","events_url":"https://api.github.com/users/ericzundel/events{/privacy}","received_events_url":"https://api.github.com/users/ericzundel/received_events","type":"User","site_admin":false},"repo":{"id":19085989,"name":"pants","full_name":"ericzundel/pants","owner":{"login":"ericzundel","id":119728,"avatar_url":"https://avatars.githubusercontent.com/u/119728?v=3","gravatar_id":"","url":"https://api.github.com/users/ericzundel","html_url":"https://github.com/ericzundel","followers_url":"https://api.github.com/users/ericzundel/followers","following_url":"https://api.github.com/users/ericzundel/following{/other_user}","gists_url":"https://api.github.com/users/ericzundel/gists{/gist_id}","starred_url":"https://api.github.com/users/ericzundel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericzundel/subscriptions","organizations_url":"https://api.github.com/users/ericzundel/orgs","repos_url":"https://api.github.com/users/ericzundel/repos","events_url":"https://api.github.com/users/ericzundel/events{/privacy}","received_events_url":"https://api.github.com/users/ericzundel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ericzundel/pants","description":"Pants Build System","fork":true,"url":"https://api.github.com/repos/ericzundel/pants","forks_url":"https://api.github.com/repos/ericzundel/pants/forks","keys_url":"https://api.github.com/repos/ericzundel/pants/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ericzundel/pants/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ericzundel/pants/teams","hooks_url":"https://api.github.com/repos/ericzundel/pants/hooks","issue_events_url":"https://api.github.com/repos/ericzundel/pants/issues/events{/number}","events_url":"https://api.github.com/repos/ericzundel/pants/events","assignees_url":"https://api.github.com/repos/ericzundel/pants/assignees{/user}","branches_url":"https://api.github.com/repos/ericzundel/pants/branches{/branch}","tags_url":"https://api.github.com/repos/ericzundel/pants/tags","blobs_url":"https://api.github.com/repos/ericzundel/pants/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ericzundel/pants/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ericzundel/pants/git/refs{/sha}","trees_url":"https://api.github.com/repos/ericzundel/pants/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ericzundel/pants/statuses/{sha}","languages_url":"https://api.github.com/repos/ericzundel/pants/languages","stargazers_url":"https://api.github.com/repos/ericzundel/pants/stargazers","contributors_url":"https://api.github.com/repos/ericzundel/pants/contributors","subscribers_url":"https://api.github.com/repos/ericzundel/pants/subscribers","subscription_url":"https://api.github.com/repos/ericzundel/pants/subscription","commits_url":"https://api.github.com/repos/ericzundel/pants/commits{/sha}","git_commits_url":"https://api.github.com/repos/ericzundel/pants/git/commits{/sha}","comments_url":"https://api.github.com/repos/ericzundel/pants/comments{/number}","issue_comment_url":"https://api.github.com/repos/ericzundel/pants/issues/comments{/number}","contents_url":"https://api.github.com/repos/ericzundel/pants/contents/{+path}","compare_url":"https://api.github.com/repos/ericzundel/pants/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ericzundel/pants/merges","archive_url":"https://api.github.com/repos/ericzundel/pants/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ericzundel/pants/downloads","issues_url":"https://api.github.com/repos/ericzundel/pants/issues{/number}","pulls_url":"https://api.github.com/repos/ericzundel/pants/pulls{/number}","milestones_url":"https://api.github.com/repos/ericzundel/pants/milestones{/number}","notifications_url":"https://api.github.com/repos/ericzundel/pants/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ericzundel/pants/labels{/name}","releases_url":"https://api.github.com/repos/ericzundel/pants/releases{/id}","created_at":"2014-04-23T21:19:16Z","updated_at":"2015-05-07T18:22:14Z","pushed_at":"2015-09-08T17:31:39Z","git_url":"git://github.com/ericzundel/pants.git","ssh_url":"git@github.com:ericzundel/pants.git","clone_url":"https://github.com/ericzundel/pants.git","svn_url":"https://github.com/ericzundel/pants","homepage":"http://pantsbuild.github.io/","size":57499,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pantsbuild:master","ref":"master","sha":"1bff7c0d1bc76b0d8fd0364070b0a41e38390934","user":{"login":"pantsbuild","id":3065172,"avatar_url":"https://avatars.githubusercontent.com/u/3065172?v=3","gravatar_id":"","url":"https://api.github.com/users/pantsbuild","html_url":"https://github.com/pantsbuild","followers_url":"https://api.github.com/users/pantsbuild/followers","following_url":"https://api.github.com/users/pantsbuild/following{/other_user}","gists_url":"https://api.github.com/users/pantsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/pantsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pantsbuild/subscriptions","organizations_url":"https://api.github.com/users/pantsbuild/orgs","repos_url":"https://api.github.com/users/pantsbuild/repos","events_url":"https://api.github.com/users/pantsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/pantsbuild/received_events","type":"Organization","site_admin":false},"repo":{"id":7209075,"name":"pants","full_name":"pantsbuild/pants","owner":{"login":"pantsbuild","id":3065172,"avatar_url":"https://avatars.githubusercontent.com/u/3065172?v=3","gravatar_id":"","url":"https://api.github.com/users/pantsbuild","html_url":"https://github.com/pantsbuild","followers_url":"https://api.github.com/users/pantsbuild/followers","following_url":"https://api.github.com/users/pantsbuild/following{/other_user}","gists_url":"https://api.github.com/users/pantsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/pantsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pantsbuild/subscriptions","organizations_url":"https://api.github.com/users/pantsbuild/orgs","repos_url":"https://api.github.com/users/pantsbuild/repos","events_url":"https://api.github.com/users/pantsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/pantsbuild/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pantsbuild/pants","description":"Pants Build System","fork":false,"url":"https://api.github.com/repos/pantsbuild/pants","forks_url":"https://api.github.com/repos/pantsbuild/pants/forks","keys_url":"https://api.github.com/repos/pantsbuild/pants/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pantsbuild/pants/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pantsbuild/pants/teams","hooks_url":"https://api.github.com/repos/pantsbuild/pants/hooks","issue_events_url":"https://api.github.com/repos/pantsbuild/pants/issues/events{/number}","events_url":"https://api.github.com/repos/pantsbuild/pants/events","assignees_url":"https://api.github.com/repos/pantsbuild/pants/assignees{/user}","branches_url":"https://api.github.com/repos/pantsbuild/pants/branches{/branch}","tags_url":"https://api.github.com/repos/pantsbuild/pants/tags","blobs_url":"https://api.github.com/repos/pantsbuild/pants/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pantsbuild/pants/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pantsbuild/pants/git/refs{/sha}","trees_url":"https://api.github.com/repos/pantsbuild/pants/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pantsbuild/pants/statuses/{sha}","languages_url":"https://api.github.com/repos/pantsbuild/pants/languages","stargazers_url":"https://api.github.com/repos/pantsbuild/pants/stargazers","contributors_url":"https://api.github.com/repos/pantsbuild/pants/contributors","subscribers_url":"https://api.github.com/repos/pantsbuild/pants/subscribers","subscription_url":"https://api.github.com/repos/pantsbuild/pants/subscription","commits_url":"https://api.github.com/repos/pantsbuild/pants/commits{/sha}","git_commits_url":"https://api.github.com/repos/pantsbuild/pants/git/commits{/sha}","comments_url":"https://api.github.com/repos/pantsbuild/pants/comments{/number}","issue_comment_url":"https://api.github.com/repos/pantsbuild/pants/issues/comments{/number}","contents_url":"https://api.github.com/repos/pantsbuild/pants/contents/{+path}","compare_url":"https://api.github.com/repos/pantsbuild/pants/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pantsbuild/pants/merges","archive_url":"https://api.github.com/repos/pantsbuild/pants/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pantsbuild/pants/downloads","issues_url":"https://api.github.com/repos/pantsbuild/pants/issues{/number}","pulls_url":"https://api.github.com/repos/pantsbuild/pants/pulls{/number}","milestones_url":"https://api.github.com/repos/pantsbuild/pants/milestones{/number}","notifications_url":"https://api.github.com/repos/pantsbuild/pants/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pantsbuild/pants/labels{/name}","releases_url":"https://api.github.com/repos/pantsbuild/pants/releases{/id}","created_at":"2012-12-17T17:39:04Z","updated_at":"2015-08-31T13:48:52Z","pushed_at":"2015-09-08T20:25:31Z","git_url":"git://github.com/pantsbuild/pants.git","ssh_url":"git@github.com:pantsbuild/pants.git","clone_url":"https://github.com/pantsbuild/pants.git","svn_url":"https://github.com/pantsbuild/pants","homepage":"http://pantsbuild.github.io/","size":78495,"stargazers_count":397,"watchers_count":397,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":116,"mirror_url":null,"open_issues_count":379,"forks":116,"open_issues":379,"watchers":397,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/1299"},"html":{"href":"https://github.com/pantsbuild/pants/pull/1299"},"issue":{"href":"https://api.github.com/repos/pantsbuild/pants/issues/1299"},"comments":{"href":"https://api.github.com/repos/pantsbuild/pants/issues/1299/comments"},"review_comments":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/1299/comments"},"review_comment":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/1299/commits"},"statuses":{"href":"https://api.github.com/repos/pantsbuild/pants/statuses/c339740050984021e727b83f8bf4a7489cb94216"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":3,"review_comments":0,"commits":1,"additions":228,"deletions":1,"changed_files":9}}