I am using latest IntelliJ IDEA (2016.1.1) - but I have seen this behaviour in previous versions too - developing in Scala with latest Scala plugin (3.0.3).
When I try to Run/Debug a test or code, IDEA will start Making the project, but will then stay there several seconds while the "Make" progress bar doesn't progress at all.
After 20-30 seconds of this, the following message appear in the Messages tab:
Warning:scala: Cannot connect to compile server at localhost/127.0.0.1:59656 Trying to compile without it
The port shown there, 59656, is a port I hard-coded myself in %USER_PROFILE%\.IntelliJIdea2016.1\config\options\scala.xml
, after I noticed this problem the first time on the default port, so changing the port did not help...
At this point, the bar will read "Reading compilation settings..." for several more tens of seconds before the code actually runs. It is terribly bothering and I can't seem to be able to fix it definitively. This can easily take up to 3 minutes to run a single test. Very disrupting. I noticed this problem happening intermittently on my work machine (Win7).
Anyone has any idea how to debug/fix this issue?
Thanks
Press Ctrl+Alt+S to open Settings/Preferences dialog. From the options on the left, select Build, Execution, Deployment | Compiler | Scala | Scala Compiler Server.
To start working with Scala in IntelliJ IDEA you need to download and enable the Scala plugin. If you run IntelliJ IDEA for the first time, you can install the Scala plugin when IntelliJ IDEA suggests downloading featured plugins. Otherwise, you can use the Settings | Plugins page for the installation.
To add Scala support to existing module:Right-click the module in Project View, choose “Add Framework Support…” Check “Scala” in technologies list (unavailable if module has Scala facet attached) Provide a path to Scala installation (if not detected)
I had the same problem, and it was caused by conflicting settings files between the settings repository and the local preferences. Your compile server settings are store in a file called scala.xml
in your IDEA preferences dir.
If you use "settings sync", i.e. an online repository to sync your IDEA settings, make sure that you have only one scala.xml
config file. Go to your Library/Preferences/<IDEA-Dir>/
and remove that file from the options
and settingsRepository
dirs. This resets to "factory settings".
Restart IntelliJ, setup the compile server again. It should now only write one file, to the settingsRepository
dir, with a new ID and port allocation for the compile server.
This fixed it for me.
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