How to use Scala compiler plugins

Looking for some help for some help in using complier plugin, in particular, ScalaCL. I have it installed in Scala home directory and can use from command line. Looking for way to enable it from IDEA, if possible with FSC.

ScalaCL optimizes Scala loops, for instance ‘for’ in converted in byte code to 'while', significantly speeding up execution. More details here:

1 comment
Comment actions Permalink

It is actually simple :)

First install a plugin into your Scala installation directory, for instance using sbaz. For ScalaCL instructions are in its website. This will put a plugin file into SCALA_HOME/misc/scala-devel/plugins. For ScalaCL there will be a file scalacl-compiler-plugin-0.2-jar.

Open Facet configuration for a module you want to use a compiler plugin. A the bottom is a place for Compiler plugins. Click "Add" and navigate to SCALA_HOME/misc/scala-devel/plugins and select the plugin you want to use. Repeat for each module you want to use the plugin. It goes relatively quick if you select "Project Settings" > "Facets".


Please sign in to leave a comment.