3

I have use the IntelliJ Scala plugin before, in 13 and 13.1. I upgraded to 14, and it doesn't work anymore for my SBT project.

For all Scala standard lib stuff, I see errors like "Cannot find symbol scala.Option".

at scala project, compiler error - Cannot resolve symbol List? says I need to have the Scala facet for my module. I looked in facets, and Scala wasn't an option.

enter image description here

I've uninstalled IntelliJ and the Scala plugin and my settings and the projects files multiple times, but still happens.

How do I fix this?

Community
  • 1
  • 1
Paul Draper
  • 78,542
  • 46
  • 206
  • 285
  • Not a solution, so not posting it as such; I've had better luck with Scala-IDE. IntelliJ wrote their own Scala parsing layer, and as such, frequently fails miserably any time macros are involved or other advanced type programming. Scala-IDE (for eclipse) uses the presentation compiler from the same compiler building your code. It can handle anything the compiler can handle, macros included. – Tim Harper Nov 14 '14 at 01:29
  • @TimHarper, interesting. I used Eclipse and found that the Scala support was significantly worse, but that was years ago. I may give that a try. – Paul Draper Nov 14 '14 at 01:32
  • I feel you @PaulDraper, I think IntelliJ Scala 1.1/1.1.1 is broken, 1.0 worked well for me (IDEA 14). Hopefully they'll fix it soon. – Dale Wijnand Nov 16 '14 at 09:31

4 Answers4

4

the new scala plugin for intellij 14 removed the facet and replaced it with Scala SDK library, see blog

for sbt project, I guess the best bet is to re-create your project by:

File -> open -> select the build.sbt of your project in popup -> delete existing project and import

Septem
  • 3,614
  • 1
  • 20
  • 20
1

I had a similar issue when a Java module calls an Scala object. The issue was from the wrong setup in Source Folders; the Scala source was in src/main/scala/..., but in the Project Structure, the Source Folders were setup as src by default. When I changed it as src/main/scala, the Java module can find the Scala object correctly.

enter image description here

prosseek
  • 182,215
  • 215
  • 566
  • 871
0

I fixed this by using the nightly builds of the Scala plugin.

The fixes have now been incorporated into the stable versions.

Paul Draper
  • 78,542
  • 46
  • 206
  • 285
0

In my case i just had to reload the IDE...

Raulucco
  • 3,406
  • 1
  • 21
  • 27