code
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:
- In your build.sbt file add:
autoCompilerPlugins := true addCompilerPlugin("org.scala-lang.plugins" % "continuations" % "2.9.1") scalacOptions += "-P:continuations:enable"
- In sbt run
reload
and then
update
- Generate the Intellij IDEA project using the sbt command
gen-idea
- 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 .
- Tick the “Enable Continuations” option in the “Compiler Options” pane.
Your project should now compile with support for continuations.
Submit a Comment