{"action":"created","issue":{"url":"https://api.github.com/repos/google/error-prone/issues/535","repository_url":"https://api.github.com/repos/google/error-prone","labels_url":"https://api.github.com/repos/google/error-prone/issues/535/labels{/name}","comments_url":"https://api.github.com/repos/google/error-prone/issues/535/comments","events_url":"https://api.github.com/repos/google/error-prone/issues/535/events","html_url":"https://github.com/google/error-prone/issues/535","id":208576024,"node_id":"MDU6SXNzdWUyMDg1NzYwMjQ=","number":535,"title":"Consider providing a com.sun.source.util.Plugin?","user":{"login":"jkeljo","id":6788825,"node_id":"MDQ6VXNlcjY3ODg4MjU=","avatar_url":"https://avatars0.githubusercontent.com/u/6788825?v=4","gravatar_id":"","url":"https://api.github.com/users/jkeljo","html_url":"https://github.com/jkeljo","followers_url":"https://api.github.com/users/jkeljo/followers","following_url":"https://api.github.com/users/jkeljo/following{/other_user}","gists_url":"https://api.github.com/users/jkeljo/gists{/gist_id}","starred_url":"https://api.github.com/users/jkeljo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkeljo/subscriptions","organizations_url":"https://api.github.com/users/jkeljo/orgs","repos_url":"https://api.github.com/users/jkeljo/repos","events_url":"https://api.github.com/users/jkeljo/events{/privacy}","received_events_url":"https://api.github.com/users/jkeljo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-02-17T22:34:06Z","updated_at":"2018-08-20T00:07:35Z","closed_at":"2017-03-01T02:21:00Z","author_association":"NONE","body":"I recently became aware of ErrorProne as @davido is working to integrate it into Buck. Glancing at the code, it looks like the key reason for exposing it as a compiler is to get a `TaskListener` into place, which is exactly what the [Plugin](https://docs.oracle.com/javase/8/docs/jdk/api/javac/tree/com/sun/source/util/Plugin.html) facility lets you do in `javac` 8 and higher. `Plugin`s can be auto-discovered on the processor path (just like annotation processors), which would make it more straightforward to run ErrorProne even with command-line `javac`, and of course any build system that supports `Plugin`s (I'm working to add such support to Buck) would no longer require a special integration."},"comment":{"url":"https://api.github.com/repos/google/error-prone/issues/comments/414165838","html_url":"https://github.com/google/error-prone/issues/535#issuecomment-414165838","issue_url":"https://api.github.com/repos/google/error-prone/issues/535","id":414165838,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDE2NTgzOA==","user":{"login":"tbroyer","id":173813,"node_id":"MDQ6VXNlcjE3MzgxMw==","avatar_url":"https://avatars1.githubusercontent.com/u/173813?v=4","gravatar_id":"","url":"https://api.github.com/users/tbroyer","html_url":"https://github.com/tbroyer","followers_url":"https://api.github.com/users/tbroyer/followers","following_url":"https://api.github.com/users/tbroyer/following{/other_user}","gists_url":"https://api.github.com/users/tbroyer/gists{/gist_id}","starred_url":"https://api.github.com/users/tbroyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbroyer/subscriptions","organizations_url":"https://api.github.com/users/tbroyer/orgs","repos_url":"https://api.github.com/users/tbroyer/repos","events_url":"https://api.github.com/users/tbroyer/events{/privacy}","received_events_url":"https://api.github.com/users/tbroyer/received_events","type":"User","site_admin":false},"created_at":"2018-08-20T00:07:35Z","updated_at":"2018-08-20T00:07:35Z","author_association":"CONTRIBUTOR","body":"@cushon So, apparently, `net.ltgt.errorprone-javacplugin` can be made to work with Java 8 by using:\r\n```gradle\r\nconfigurations {\r\n  javac\r\n}\r\ndependencies {\r\n  javac 'com.google.errorprone:javac:9+181-r4173-1'\r\n}\r\ntasks.withType(JavaCompile) {\r\n  options.fork = true\r\n  options.forkOptions.jvmArgs.addAll(configurations.javac.collect { \"-Xbootclasspath/p:$it\" })\r\n}\r\n```\r\n(this is `-Xbootclasspath/p:` and not `-J-Xbootclasspath/p:` because Gradle does not call `javac` directly, but through `javax.tools.JavaCompiler` API)"}}
{"actor":{"display_login":"tbroyer"}}