Image Image Image Image Image
Scroll to Top

To Top

code

01

Nov
2011

No Comments

In code
Uncategorized

By admin

scala 2.9.1 + sbt 0.11 + Intellij IDEA (10/11) + scala continuations plugin

On 01, Nov 2011 | No Comments | In code, Uncategorized | By admin

It took me some time to figure out how to compile a project in Intellij IDEA with the scala continuations plugin turned on. I was getting this error when I ran the project:

bad option: -P:continuations:enable

Here is what you need to do to make it work:

  1. In your build.sbt file add:
    autoCompilerPlugins := true
    
    addCompilerPlugin("org.scala-lang.plugins" % "continuations" % "2.9.1")
    
    scalacOptions += "-P:continuations:enable"
  2. In sbt run
    reload

    and then

    update
  3. Generate the Intellij IDEA project using the sbt command
    gen-idea
  4. Open the Intellij IDEA project and go to “Project Structure” -> “Modules” ->”Scala” and add the continuations plugin jar file in the “Compiler Plugins” pane. The jar should be in ~/.ivy2/cache/org.scala-lang.plugins/continuations/jars/continuations-2.9.1.jar .
  5. Tick the “Enable Continuations” option in the “Compiler Options” pane.
Your project should now compile with support for continuations.

Submit a Comment