Real FSC support
Usual Scala compilation never seems fast enough. There are two main reasons why:
- It takes a lot of time to start Scala compiler and to process standard libraries.
- Scala compiler doesn’t support selective recompilation.
The first problem is solved by FSC (Fast Scala Compiler). FSC runs a compilation daemon to avoid subsequent compiler instantiations (at the price of increased memory usage).
However, FSC still re-compiles everything you throw at it (usually – the whole project, even if you’ve changed a single file). To speed up compilation further, we need to use a selective recompilation, that is provided only by third-party tools (like SBT or IDE).
So, the combination of IDEA and FSC can provide lightning-fast Scala compilation.
Scala plugin has been supporting FSC for a long time. Kind of… It was hard to configure and use FSC, settings was vague and compilation daemon was … you know, uncontrollable. Now that things have changed.
We can setup either internal FSC server (per project) or external (possibly remote) one:
Then we may use that server in any module we want:
So we can mix FSC with ordinary Scala compilers (when there are multiple versions of Scala used or when we need special compilation settings for some modules).
IDEA automatically manages internal FSC servers – it starts an instance when needed and stops it on application exit (or project close). Additionally, we can manually start, stop or reset compilation daemon using a menu on FSC status icon:
Besides FSC status icon (a little gear-gauge in the status bar) we are receiving notifications on FSC events:
P. S. Mac users may need to configure the OS X firewall for FSC communication.
IntelliJScala @ Scala Days 2023 Madrid
On September 12 – 14, the Scala Plugin team was in Madrid for the Scala Days conference. JetBrains was a Gold Sponsor for the event and we are very proud of it. We came to Madrid with a booth, merchandise, and a talk about the IntelliJ Scala Plugin. The Scala Plugin has seen a lot of improvements…
IntelliJ Scala Plugin 2023.2 Is Out!
Better Scala 3 Support IntelliJ IDEA 2023.2 brings enhanced Scala 3 support, with a focus on providing a streamlined development experience. Notable improvements include fixes for Scala 3 enum highlighting, navigation to enum definitions, and the correct resolution of enum cases in various contex…
IntelliJ Scala Plugin 2023.1 Is Out!
Improved support for braceless Scala syntax IntelliJ IDEA can now desugar braceless Scala code properly, and it handles refactorings where the “fewer braces” feature is used. It also supports braceless syntax in worksheets and correctly interprets indentation when you move extensions methods up a…
IntelliJ Scala Plugin 2022.3 Is Out!
This release has been again focused on Scala 3, but there are also quite a few other improvements. Better Scala 3 support In v2022.3, we’ve introduced a large number of upgrades to provide better Scala 3 support. The IDE now supports parameter untupling and quoted patterns, and it features man…