How do you use external Scala compiler with IDEA ? I seem to have randomly appearing errors saying "scala: Cannot connect to compile server at localhost/127.0.0.1:3200"
Sometimes it works. Sometimes it doesn't. I can't find the pattern.
Here is what I have in the log
9:20:58 PM Auto make completed with errors
9:21:09 PM Using a new (SBT-based) Scala compiler.
In case of any compilation problems you may enable the previous (internal) compiler by clearing:
Project Settings / Compiler / Use external build
9:21:10 PM Scala compile server
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
9:21:12 PM Compilation completed with 1 error and 0 warnings in 3 sec
I'm using
In Project Settings / Compiler / Use external build is checked. In IDE Settings / Scala / Run compile server is checked.
Do I need to launch compiler server manually ? Anything else ?
UPD: Looks like bug to me. I posted JIRA ticket http://youtrack.jetbrains.com/issue/SCL-5523
Scala has both a compiler and an interpreter which can execute Scala code. The Scala compiler compiles your Scala code into Java Byte Code which can then be executed by the scala command. The scala command is similar to the java command, in that it executes your compiled Scala code.
Press Ctrl+Alt+S to open Settings/Preferences dialog. From the options on the left, select Build, Execution, Deployment | Compiler | Scala | Scala Compiler Server.
Press Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment | Build Tools | sbt. In the sbt projects section, select a project for which you want to configure build actions. In the sbt shell section, select the builds option. Click OK to save the changes.
You need to lower the heap size from 1024 to 512 or something. Then the compile server can be created and started. Tried with the InteliJ 13.0.2 (133.331) and Scala plugin 0.26.361
Go to Settings -> Compiler and uncheck "Use external build"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With