views:

46

answers:

2

The scala plugin seems to automatically download version 2.8 of Scala. I'l like to try out the Gridgain 3.0-beta, which currently only works with Scala 2.7.7. Since Gridgain 3.0-beta already provides scala-compiler-2.7.7.jar and scala-library-2.7.7.jar, is it possible to get the Eclipse Scala Plugin to compile to Scala 2.7.7?

I tried removing the Scala Library 2.8 from the project build path and added both the 2.7 jars, but this didn't seem to work.

Would this be easier if I switched to Netbeans?

+4  A: 

Both the Eclipse plugin and the NetBeans plugin use the Scala Compiler for a lot of things from the simple stuff like syntax highlighting to stuff like type inference, resolution and display of implicits to more involved stuff like automated type-driven refactorings and semantic highlighting.

And more specifically, they use the 2.8 compiler, because the 2.8 compiler has a completely refactored API and a new framework (the so-called presentation compiler), which is specifically designed for IDEs, so that they can get all the information they need out of the compiler, but also can feed information (like in the case of refactorings) back into the compiler.

So, in short: the version of the plugin is closely coupled to the version of the compiler, and the compiler in turn only supports one version of the language. In particular, the IDE plugins require a 2.8 version of the compiler, because they use the new presentation compiler framework, and the 2.8 compiler does not support the 2.7 language.

This tight coupling is of course not a good thing, and it will get broken up in the future, but for now, you are stuck.

You could try the IntelliJ IDEA IDE and their Scala plugin. As far as I know, they have written their own compiler (well, at least the parts they need for syntax highlighting and refactoring purposes) purely from the Scala Language Specification, without using any of the Scala Compiler APIs. The Scala Plugin does work with the Community Edition.

Jörg W Mittag
+3  A: 

The best place for questions like this is the Scala IDE user mailing list. But in brief, the Eclipse tooling for Scala doesn't support the use of other versions of the Scala compiler and libraries than the ones which it ships with. This is unlikely to change in the foreseeable future.

Miles Sabin