Question

So I'm using a graph library that has it's dependencies for Scala listed in build.sbt as 2.8.1. I tried changing it to Scala 2.9.2, and it compiled fine, but got this runtime error:

[error] (run-main) java.lang.NoSuchMethodError: scala.runtime.RichInt.until(I)Lscala/collection/immutable/Range$ByOne;
java.lang.NoSuchMethodError: scala.runtime.RichInt.until(I)Lscala/collection/immutable/Range$ByOne;

It also lists the line number in the mess of errors, and I traced it to a line of code like:

for (i <- 0 to x)

I'm pretty sure Scala 2.9.2 does have the to method.. what am I missing?

Thanks!

Was it helpful?

Solution

This looks like you are using some library compiled for 2.8.x with code compiled with 2.9.x. Doing that is not possible.

Edit

Ok, I checked out Cassovary, and I imagine you did not change the Scala version for specs. I checked what versions are available, and I suggest you change its line to this:

libraryDependencies += "org.scala-tools.testing" % "specs_2.9.1" % "1.6.9" % "test" withSources()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top