Can anyone give me some clear instructions on how to get fsc working?
I am using Idea IU-95.66 with Scala plugin nightly build 1456 on Ubuntu 10.04 with a 64-bit JVM. I have an Idea project with two modules, one Scala only and the other mixed - both have Scala modules using 2.8.0.RC2 supplied with the plugin.
I have seen two approaches on this forum:
* run the CompileServer from the command line
* create an application server profile for "Scala Compilation Server" and run it
However, neither approach has worked for me.
When I tried running fsc from the Scala Compilation Server profile, it starts up on a different port each time, which seemed to require re-configuring the Scala Compiler in Idea each time I run it to use whatever port fsc has chosen (?).
Clicking Make causes an error:
Internal error (Plugin: org.intellij.scala): org.jetbrains.plugins.scala.lang.psi.stubs.impl.ScPrimaryConstructorStubImpl cannot be cast to com.intellij.psi.stubs.PsiFileStub
Well then, that seemed like a dead end.
Note: Since you have to tell the Scala compiler which port fsc is on, I tried to see if I could specify the port number by adding "-Didea.launcher.port=7534" to the VM options in the application profile. This doesn't work - the application profile just appends another -Didea.launcher.port option further on down the line.
So then I tried running fsc from the command line like this:
/usr/lib/jvm/java-6-sun-184.108.40.206/bin/java -verbose -Denv.classpath="%CLASSPATH%" -Denv.emacs="%EMACS%" -Didea.launcher.port=7534 -Didea.launcher.bin.path=/home/prasinous/idea-IU-95.66/bin -Dfile.encoding=UTF-8 -classpath /home/prasinous/.m2/repository/org/scala-lang/scala-library/2.8.0.RC2/scala-library-2.8.0.RC2.jar:/home/prasinous/.m2/repository/org/scala-lang/scala-compiler/2.8.0.RC2/scala-compiler-2.8.0.RC2.jar:/home/prasinous/idea-IU-95.66/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain scala.tools.nsc.CompileServer
fsc starts up, lsof shows it bound to port 7534, ps doesn't show multiple CompileServer processes running, and fsc verbose output shows libraries being loaded. Then it sits there waiting.
So then I went to Idea and configured the Scala Compiler to use fsc on server port 7534, but when I try to make I get this error:
fatal error: object scala not found.
one error found
I know it connected to fsc though, because verbose output showed the same Scala and Java libs being reloaded. If I hit the make button again, make complains that "-server:7534" is not available and hangs indefinitely with the progress bar showing 50%. All attempts to stop make fail, and I have to actually kill Idea.
So, I am looking for two pieces of advice:
* what am I doing wrong?
* will getting fsc working improve performance editing Scala files in Idea, which unfortunately has been very problematic for me?