I'm trying to compile a class using continuations in scala 2.11.2 and I can't get it to compile with sbt. The program compiles when using scalac and it works how I want it to, so I know that it isn't my code.
I compile and run successfully using
scalac -Xplugin ~/Software/scala-continuations-plugin_2.11.2-1.0.2.jar -P:continuations:enable Coroutine.scala
scala -Xplugin ~/Software/scala-continuations-plugin_2.11.2-1.0.2.jar -cp . coroutine.CoroutineTest
however, when I try compiling with sbt, I get the following error
[error] bad option: -P:continuations:enable
Here is my build.sbt file
name := "coroutine"
version := "1.0"
scalaVersion := "2.11.2"
autoCompilerPlugins := true
libraryDependencies += "org.scala-lang.plugins" % "scala-continuations-plugin_2.11.2" % "1.0.2"
scalacOptions += "-P:continuations:enable"
You can view the code and sbt file as well at
http://www.cs.uga.edu/~jam/coroutine/Coroutine.scala
and
http://www.cs.uga.edu/~jam/coroutine/build.sbt
I also tried using scalacOptions to call -Xplugins as I do in my scalac command above. This resulted in the error
[error] bad option: '-Xplugin ~/Software/scala-continuations-plugin_2.11.2-1.0.2.jar'