Scalatest version causes problems

48 views
Skip to first unread message

Channing

unread,
Jun 11, 2011, 4:51:51 PM6/11/11
to scala-labs
Hi,

I had lots of these errors: Could not run test
org.scalalabs.basic.lab03.BasicPatternMatchingExerciseTest:
java.lang.ClassCastException: scala.collection.immutable.Set$EmptySet$
cannot be cast to scala.collection.generic.Addable

I needed to change scalatest config in the sbt project to:

val scalatest = "org.scalatest" %% "scalatest" % "1.6.1.RC1" % "test"

Then it all worked.

By the way, this is a great idea, thanks for doing it. I'll be
recommending it to newbies everywhere.

Channing

Raymond Roestenburg

unread,
Jun 12, 2011, 4:54:56 AM6/12/11
to scala...@googlegroups.com
Hi Channing,

On Sat, Jun 11, 2011 at 10:51 PM, Channing <channin...@googlemail.com> wrote:
Hi,

I had lots of these errors: Could not run test
org.scalalabs.basic.lab03.BasicPatternMatchingExerciseTest:
java.lang.ClassCastException: scala.collection.immutable.Set$EmptySet$
cannot be cast to scala.collection.generic.Addable

Strange never got that problem myself. Sounds like some lib was not compiled with Scala 2.9.0. Did it also occur after a sbt clean-cache clean-lib clean update? I've updated it to 2.9.0 1.6.1.RC1 anyway, thanks! should be: val scalatest = "org.scalatest" % "scalatest_2.9.0" % "1.6.1.RC1" % "test-    >default"

I needed to change scalatest config in the sbt project to:

val scalatest = "org.scalatest" %% "scalatest" % "1.6.1.RC1" % "test"

Then it all worked.

By the way, this is a great idea, thanks for doing it. I'll be
recommending it to newbies everywhere.

Channing



--
Raymond Roestenburg

Raymond Roestenburg

unread,
Jun 12, 2011, 4:55:51 AM6/12/11
to scala...@googlegroups.com
typo:
val scalatest = "org.scalatest" % "scalatest_2.9.0" % "1.6.1.RC1" % "test->default"

Channing Walton

unread,
Jun 12, 2011, 11:10:15 AM6/12/11
to scala...@googlegroups.com
cool.

Why not use
 val scalatest = "org.scalatest" %% "scalatest" % "1.6.1.RC1" % "test->default"

ie use %% to get sbt to append the scala version number automatically.

Channing

Raymond Roestenburg

unread,
Jun 13, 2011, 4:47:46 AM6/13/11
to scala...@googlegroups.com
Didn't know about that feature that's even better. 


--
Raymond Roestenburg

twtr: @RayRoestenburg

Raymond Roestenburg

unread,
Jun 13, 2011, 10:35:26 AM6/13/11
to scala-labs
Changed it to val scalatest = "org.scalatest" %% "scalatest" %
"1.6.1.RC1" % "test->default"

On Jun 13, 10:47 am, Raymond Roestenburg
<raymond.roestenb...@gmail.com> wrote:
> Didn't know about that feature that's even better.
>
> --
> Raymond Roestenburg
>
> code:http://github.com/RayRoestenburg
> blog:http://roestenburg.agilesquad.com
> twtr: @RayRoestenburg
>
> On Jun 12, 2011, at 17:10, Channing Walton <channing.wal...@googlemail.com
>
>
>
>
>
>
>
>  > wrote:
> > cool.
>
> > Why not use
> >  val scalatest = "org.scalatest" %% "scalatest" % "1.6.1.RC1" %  
> > "test->default"
>
> > ie use %% to get sbt to append the scala version number automatically.
>
> > Channing
>
> > On 12 Jun 2011, at 09:55, Raymond Roestenburg wrote:
>
> >> typo:
> >> val scalatest = "org.scalatest" % "scalatest_2.9.0" % "1.6.1.RC1" %  
> >> "test->default"
>
> >> On Sun, Jun 12, 2011 at 10:54 AM, Raymond Roestenburg <raymond.roestenb...@gmail.com
> >> > wrote:
> >> Hi Channing,
>
> >> On Sat, Jun 11, 2011 at 10:51 PM, Channing <channing.wal...@googlemail.com

Channing Walton

unread,
Jun 13, 2011, 3:16:30 PM6/13/11
to scala...@googlegroups.com
Cool.
Reply all
Reply to author
Forward
0 new messages