Should I expect ScalaTest to work with 2.9.0-SNAPSHOT?

41 views
Skip to first unread message

paulbutcher

unread,
Feb 2, 2011, 4:18:59 PM2/2/11
to scalatest-users
I'm trying to use 2.9.0-SNAPSHOT, and am getting an exception when
running a trivial test. Should I expect this to work, or does
ScalaTest just not support 2.9.0 yet?

Thanks!

The exception is:

java.lang.ClassCastException: scala.collection.immutable.Set$EmptySet$
cannot be cast to scala.collection.generic.Addable
at org.scalatest.tools.Runner$.parseCompoundArgIntoSet(Runner.scala:
1037)
at org.scalatest.tools.ScalaTestFramework
$ScalaTestRunner.run(ScalaTestFramework.scala:53)
at sbt.TestRunner.run(TestFramework.scala:52)
at sbt.TestRunner.runTest$1(TestFramework.scala:66)
at sbt.TestRunner.run(TestFramework.scala:75)
at sbt.TestFramework$$anonfun$9$$anonfun$apply$11.runTest
$2(TestFramework.scala:192)
at sbt.TestFramework$$anonfun$9$$anonfun$apply$11$$anonfun$apply
$12.apply(TestFramework.scala:203)
at sbt.TestFramework$$anonfun$9$$anonfun$apply$11$$anonfun$apply
$12.apply(TestFramework.scala:203)
at sbt.NamedTestTask.run(TestFramework.scala:91)
at sbt.ScalaProject$$anonfun$sbt$ScalaProject$$toTask
$1.apply(ScalaProject.scala:187)
at sbt.ScalaProject$$anonfun$sbt$ScalaProject$$toTask
$1.apply(ScalaProject.scala:187)
at sbt.TaskManager$Task.invoke(TaskManager.scala:62)
at sbt.impl.RunTask.doRun$1(RunTask.scala:77)
at sbt.impl.RunTask.runTask(RunTask.scala:85)
at sbt.impl.RunTask.sbt$impl$RunTask$$runIfNotRoot(RunTask.scala:60)
at sbt.impl.RunTask$$anonfun$runTasksExceptRoot$2.apply(RunTask.scala:
48)
at sbt.impl.RunTask$$anonfun$runTasksExceptRoot$2.apply(RunTask.scala:
48)
at sbt.Distributor$Run$Worker$$anonfun$2.apply(ParallelRunner.scala:
131)
at sbt.Distributor$Run$Worker$$anonfun$2.apply(ParallelRunner.scala:
131)
at sbt.Control$.trapUnit(Control.scala:19)
at sbt.Distributor$Run$Worker.run(ParallelRunner.scala:131)

The test is:

import org.scalatest.WordSpec

class MockSpec extends WordSpec {

"a mock" should {
"do something" in {
expect(1) { 1 }
}
}
}

Bill Venners

unread,
Feb 2, 2011, 6:08:30 PM2/2/11
to scalate...@googlegroups.com
Hi Paul,

I haven't tried compiling against 2.9 yet, no.

Bill

> --
> You received this message because you are subscribed to the Google
> Groups "scalatest-users" group.
> To post to this group, send email to scalate...@googlegroups.com
> To unsubscribe from this group, send email to
> scalatest-use...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/scalatest-users?hl=en
> ScalaTest itself, and documentation, is available here:
> http://www.artima.com/scalatest
>

--
Bill Venners
Artima, Inc.
http://www.artima.com

paulbutcher

unread,
Feb 3, 2011, 4:51:24 AM2/3/11
to scalatest-users
On Feb 2, 11:08 pm, Bill Venners <b...@artima.com> wrote:
> I haven't tried compiling against 2.9 yet, no.

No worries - I might take a quick look, in that case, and see if it's
anything obvious :-)

Cheers!

Kevin Wright

unread,
Feb 3, 2011, 4:57:25 AM2/3/11
to scalate...@googlegroups.com
Did either Dick or yourself look again to getting my maven dependencies patch added to ScalaTest now you've finished the migration to Google Code?  That should make it trivial to bump up to a snapshot version.
Kevin Wright

gtalk / msn : kev.lee...@gmail.com
mail: kevin....@scalatechnology.com
vibe / skype: kev.lee.wright
quora: http://www.quora.com/Kevin-Wright
twitter: @thecoda

READ CAREFULLY. By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED  agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

paulbutcher

unread,
Feb 3, 2011, 10:28:57 AM2/3/11
to scalatest-users
On Feb 3, 9:51 am, paulbutcher <paulrabutc...@googlemail.com> wrote:
> No worries - I might take a quick look, in that case, and see if it's
> anything obvious :-)

Hmm - so I've made some progress, but it doesn't look like there's a
simple solution. The problem seems to be that some of the .jar files
supplied with ScalaTest will need compiling with 2.9.0. See:

http://groups.google.com/group/scala-user/browse_thread/thread/d2642f9df5609338

I guess that I'll put this on hold until ScalaTest gets some general
2.9.0 love :-)

Thanks!

Bill Venners

unread,
Feb 3, 2011, 10:50:07 AM2/3/11
to scalate...@googlegroups.com
Hi Paul,

OK. Thanks. If 2.9 is supposed to be binary compatible with 2.8, then
it smells more like a bug in the daily 2.9 snapshot. The line that
shows up in your stack trace is inside the Scala API not ScalaTest.
All ScalaTest is doing is calling ++ on Set, so that should still
work. (All bets are off if 2.9 isn't guaranteed to be binary
compatible. Then you'd need a ScalaTest recompile.)

Bill

paulbutcher

unread,
Feb 3, 2011, 1:43:17 PM2/3/11
to scalatest-users
On Feb 3, 3:50 pm, Bill Venners <b...@artima.com> wrote:
> OK. Thanks. If 2.9 is supposed to be binary compatible with 2.8, then
> it smells more like a bug in the daily 2.9 snapshot.

Is 2.9 supposed to be binary compatible with 2.8? I don't seem to be
able to find anything definitive on the subject :-(

Certainly 2.8 wasn't with 2.7, so I'm not sure that I'd assume that
2.9 will be with 2.8?

Bill Venners

unread,
Feb 3, 2011, 4:45:38 PM2/3/11
to scalate...@googlegroups.com
Hi Paul,

2.8 should really have been named 3.0, but it had gotten known as 2.8
so they kept it that. I'm not sure what the exact promise is, but
binary compatibility is definitely in there and they have a tool that
verifies it.

Bill

paulbutcher

unread,
Feb 4, 2011, 4:58:34 AM2/4/11
to scalatest-users
On Feb 3, 9:45 pm, Bill Venners <b...@artima.com> wrote:
> I'm not sure what the exact promise is, but
> binary compatibility is definitely in there and they have a tool that
> verifies it.

Is this what you're referring to?

http://www.scalasolutions.com/products/migrationmanager

> The Migration Manager scans all the class files in your project,
> detecting incompatibilities, and generates a new class file with
> corrections applied that make an older version file compatible
> with the new version.

This doesn't sound like it verifies binary compatibility, more like it
retrofits it :-(

See also:

http://groups.google.com/group/scala-user/browse_thread/thread/d2642f9df5609338/cc36a992d1f6ea88#cc36a992d1f6ea88

Bill Venners

unread,
Feb 11, 2011, 6:00:45 AM2/11/11
to scalate...@googlegroups.com
Hi Paul,

I remembered that the promise is that point releases (I think they are
called, i.e., the x in 2.8.x or 2.9.x) are supposed to be binary
compatible. So 2.8.1 should be binary compatible with 2.8.0, etc. But
2.9 is not guaranteed to be binary compatible to 2.8, and that's where
the migration manager would come in.

I just posted an announcement about a 1.4-SNAPSHOT compiled against a
recent nightly build of Scala 2.9.

Bill

bryan hunt

unread,
Feb 16, 2011, 8:34:05 AM2/16/11
to scalatest-users
Hi Bill,

Where did you post that announcement/where is it available to
download?

Thanks,

Bryan Hunt
> >http://groups.google.com/group/scala-user/browse_thread/thread/d2642f...

Bill Venners

unread,
Feb 17, 2011, 11:19:36 PM2/17/11
to scalate...@googlegroups.com
Hi Bryan,

Sorry I missed your email when the moderation email came through two
days ago. I posted a pointer to the 2.9 nightly version of ScalaTest
to this mailing list. Anyway, it is called 1.4-SNAPSHOT. It is a few
days old now, but you can give it a try. Info is here:

http://groups.google.com/group/scalatest-users/browse_thread/thread/c9d57f51a66885d5

Thanks.

Bill

bryan hunt

unread,
Apr 2, 2011, 1:14:19 PM4/2/11
to scalatest-users
thanks bill.

On Feb 18, 5:19 am, Bill Venners <b...@artima.com> wrote:
> Hi Bryan,
>
> Sorry I missed your email when the moderation email came through two
> days ago. I posted a pointer to the 2.9 nightly version of ScalaTest
> to this mailing list. Anyway, it is called 1.4-SNAPSHOT. It is a few
> days old now, but you can give it a try. Info is here:
>
> http://groups.google.com/group/scalatest-users/browse_thread/thread/c...
Reply all
Reply to author
Forward
0 new messages