Search code examples
playframeworksbtscala.jsintellij-14

IntelliJ editor error highlighting for ScalaJS


I'm using IntelliJ on Windows and OSX to develop a Play framework project that includes a ScalaJS part. The project builds and runs correctly on both systems using activator.

However, the IntelliJ editor on Windows underlines what it thinks are errors in my source, while on OSX it does not. If I navigate to the library source code related to the error, I get to different files. For example, on Windows it might go to:

C:\Users\Me\.ivy2\cache\org.scala-js\scalajs-dom_sjs0.6_2.11\jars\scalajs-dom_sjs0.6_2.11-0.9.0.jar!\org\scalajs\dom\raw\Element.class

while on OSX it would go to:

~/.ivy2/cache/org.scala-js/scalajs-dom_sjs0.6_2.11/srcs/scalajs-dom_sjs0.6_2.11-0.9.0-sources.jar!/org/scalajs/dom/raw/lib.scala

How does IntelliJ determine the library sources to use for editor error analysis, and how can I get it to do the correct thing on both OSs?


Solution

  • Updating the Scala plugin for IntelliJ to version 2016.3.8 (released today!) fixed this. The exact problem is described here: https://youtrack.jetbrains.com/issue/SCL-11224