{"action":"created","issue":{"url":"https://api.github.com/repos/scalacenter/scalafix/issues/880","repository_url":"https://api.github.com/repos/scalacenter/scalafix","labels_url":"https://api.github.com/repos/scalacenter/scalafix/issues/880/labels{/name}","comments_url":"https://api.github.com/repos/scalacenter/scalafix/issues/880/comments","events_url":"https://api.github.com/repos/scalacenter/scalafix/issues/880/events","html_url":"https://github.com/scalacenter/scalafix/issues/880","id":362551350,"node_id":"MDU6SXNzdWUzNjI1NTEzNTA=","number":880,"title":"Scalafix does not work with java 11","user":{"login":"markehammons","id":2609471,"node_id":"MDQ6VXNlcjI2MDk0NzE=","avatar_url":"https://avatars1.githubusercontent.com/u/2609471?v=4","gravatar_id":"","url":"https://api.github.com/users/markehammons","html_url":"https://github.com/markehammons","followers_url":"https://api.github.com/users/markehammons/followers","following_url":"https://api.github.com/users/markehammons/following{/other_user}","gists_url":"https://api.github.com/users/markehammons/gists{/gist_id}","starred_url":"https://api.github.com/users/markehammons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markehammons/subscriptions","organizations_url":"https://api.github.com/users/markehammons/orgs","repos_url":"https://api.github.com/users/markehammons/repos","events_url":"https://api.github.com/users/markehammons/events{/privacy}","received_events_url":"https://api.github.com/users/markehammons/received_events","type":"User","site_admin":false},"labels":[{"id":620952171,"node_id":"MDU6TGFiZWw2MjA5NTIxNzE=","url":"https://api.github.com/repos/scalacenter/scalafix/labels/blocked","name":"blocked","color":"000000","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-09-21T10:23:17Z","updated_at":"2018-11-27T13:53:39Z","closed_at":null,"author_association":"NONE","body":"When trying to run scalafix on java 11 I get the following error: ```error: Unable to load symbol table```\r\n\r\nHaving looked into it, it looks like the issue is related to these two files: \r\n\r\nThis one seems to be the source of the error message:\r\nhttps://github.com/scalacenter/scalafix/blob/master/scalafix-testkit/src/main/scala/scalafix/testkit/SemanticRuleSuite.scala\r\n\r\nThis one seems to be the cause of the error:\r\nhttps://github.com/scalacenter/scalafix/blob/47e25af12e014017fd7cb4a519ffc51639ea937a/scalafix-reflect/src/main/scala/scalafix/internal/reflect/ClasspathOps.scala\r\n\r\nIn ClasspathOps.scala, you have some code that looks like this:\r\n\r\n```scala\r\n  def bootClasspath: Option[Classpath] = sys.props.collectFirst {\r\n    case (k, v) if k.endsWith(\".boot.class.path\") => Classpath(v)\r\n  }\r\n```\r\n\r\n```sun.boot.class.path``` doesn't exist in java 9+ as you can see in this stack overflow issue: https://stackoverflow.com/questions/50451536/how-to-get-boot-class-path-in-jdk-9-or-later\r\n\r\nThe solution is listed there as well, you need to look for ```java.class.path```. The fixed code should look something like this: \r\n\r\n```scala\r\n  def bootClasspath: Option[Classpath] = sys.props.collectFirst {\r\n    case (k, v) if k.endsWith(\".boot.class.path\") => Classpath(v)\r\n    case (k,v) if k == \"java.class.path\" => Classpath(v)\r\n  }\r\n```\r\n\r\nI tried to download and build scalafix to test my theory, but I ran into a number of issues with the build process. It seems like scala.predef is disabled in my builds somehow, but a ton of classes rely on the predef methods, like turning java streams into lists, calling ```.foreach``` on java streams, and other things. In any case, I could not get the project to build so I could test my code."},"comment":{"url":"https://api.github.com/repos/scalacenter/scalafix/issues/comments/442065672","html_url":"https://github.com/scalacenter/scalafix/issues/880#issuecomment-442065672","issue_url":"https://api.github.com/repos/scalacenter/scalafix/issues/880","id":442065672,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjA2NTY3Mg==","user":{"login":"olafurpg","id":1408093,"node_id":"MDQ6VXNlcjE0MDgwOTM=","avatar_url":"https://avatars0.githubusercontent.com/u/1408093?v=4","gravatar_id":"","url":"https://api.github.com/users/olafurpg","html_url":"https://github.com/olafurpg","followers_url":"https://api.github.com/users/olafurpg/followers","following_url":"https://api.github.com/users/olafurpg/following{/other_user}","gists_url":"https://api.github.com/users/olafurpg/gists{/gist_id}","starred_url":"https://api.github.com/users/olafurpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olafurpg/subscriptions","organizations_url":"https://api.github.com/users/olafurpg/orgs","repos_url":"https://api.github.com/users/olafurpg/repos","events_url":"https://api.github.com/users/olafurpg/events{/privacy}","received_events_url":"https://api.github.com/users/olafurpg/received_events","type":"User","site_admin":false},"created_at":"2018-11-27T13:53:39Z","updated_at":"2018-11-27T13:53:39Z","author_association":"MEMBER","body":"Opened PR in Scalameta to add Java 11 support https://github.com/scalameta/scalameta/pull/1810"}}
{"actor":{"display_login":"olafurpg"}}