Enabling Scala continuations in SBT 0.13 gives NoSuchMethodError

After some googling, I have the following in project/plugins.sbt:

autoCompilerPlugins := true

libraryDependencies +=
    compilerPlugin("org.scala-lang.plugins" % "continuations" % "2.10.3-RC3")

scalacOptions += "-P:continuations:enable"

My code compiles, but when I try to run, I encounter the following error:

java.lang.NoSuchMethodError: scala.util.continuations.package $ .shift error.

+3
source share
1 answer

You want the compiler plugin configuration to be part of your project, i.e. in project.sbtor build.sbt:

autoCompilerPlugins := true

libraryDependencies +=
  compilerPlugin("org.scala-lang.plugins" % "continuations" % "2.10.3-RC3")

scalacOptions += "-P:continuations:enable"
+1
source

All Articles