IntelliJ 14.0.2, Scala plugin 1.2.1 & Maven

I am looking at the latest version of IntelliJ community edition with the latest scala plugin and am confused about why the most basic syntax is not recognised despite the fact that IntelliJ can happily compile my project.  A bit of googling suggests this may be due to the change to replace the scala facet with a global scala library.

My sample project can be found here: https://github.com/jonfreedman/timeseries

In TestAgainstSpecification.scala classOf generates an error "cannot resolve symbol classOf" but ctrl+shift+f9 will compile the class fine and it can be run via the junit runner.

Can you please advise on how my project should be configured?

7 comments
Comment actions Permalink

Try File -> Invalidate Caches. This is known already fixed bug. Fix will be released in today EAP. Public release 1.3 will be available next week.

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

I did try that several times, I will check again when I get home.  Could you confirm whether with the latest & greatest plugin I should set up a global scala sdk or if the maven dependency will be sufficient in order to build the project?

0
Comment actions Permalink

New plugin EAP contains fix for requirment of Invalidate Caches. So it should be ok for you without it.
I checked your project, for me it worked without any special setup (so just wait for the Maven refresh and you don't need to setup global scala lib).

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

Invalidate caches does not seem to fix the problem, I've checked in a pointless test which generates the error "cannot resolve symbol collection"

The Global Libraries in my project is empty, and here are the dependencies:
intellij.png
And the compiler error:
intellij.png

0
Comment actions Permalink

Is it still Scala plugin 1.2.1? Please try the latest plugin EAP: http://blog.jetbrains.com/scala/2015/01/19/scala-plugin-1-3-eap-1-2-67-is-available/

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

Looks like IntelliJ 139.1116.4 + Scala plugin 1.2.67.1.EAP works - does this depend on 14.0.3 being released?  I'm just concerned that if my team at work upgrades to 14.0.2 all our scala code will be flagged with errors...

0
Comment actions Permalink

Scala plugin 1.3 will be released next week (most probably Wednesday). It doesn't depend from 14.0.3 as we have own release cycle. Also it will be compatible with 14.0.2.

In Scala plugin we got this problem with IDEA 14 release. After few months of investigations I finally descovered it as JIT bug (something really specific as with simple examples it's not reproducible). I also found workaround for this problem, and according to few reports (including yours) I see that it fixes original problem. This EAP also contains some dangerous changes, which should be tested with real world projects a bit, that's why we can't release plugin earlier than next week.

Best regards,
Alexander Podkhalyuzin.

0

Please sign in to leave a comment.