A ScalaTest user got a stack trace trying to use ScalaTest 1.6.1 with
2.9.1 that looks like it could be a binary compatibility between 2.9.1
and 2.9.0, but I'm not certain. The way I deployed that version was by
redeploying the binaries I built against 2.9.0 under the artifact tag
scalatest_2.9.1, because all 2.9.x are supposed to be binary
compatible. Does that stack trace look familiar to anyone?
Bill
---------- Forwarded message ----------
From: vvilhonen <vesa.v...@gmail.com>
Date: Tue, Nov 1, 2011 at 5:04 AM
Subject: [scalatest-users] Binary incompatibilities with 2.9.1?
To: scalatest-users <scalate...@googlegroups.com>
Hi,
I'm using scalatest 1.6.1 with sbt 0.11.0 and scala 2.9.1. When trying
to execute a simple true should equal (true) spec I get a
ClassCastException right after stepping to scalatest from sbt. Stack
trace:
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:87)
at sbt.TestRunner.delegateRun(TestFramework.scala:61)
at sbt.TestRunner.run(TestFramework.scala:55)
at sbt.TestRunner.runTest$1(TestFramework.scala:75)
at sbt.TestRunner.run(TestFramework.scala:84)
at sbt.TestFramework$$anonfun$6$$anonfun$apply$8$$anonfun$7$$anonfun
$apply$9.apply(TestFramework.scala:183)
at sbt.TestFramework$$anonfun$6$$anonfun$apply$8$$anonfun$7$$anonfun
$apply$9.apply(TestFramework.scala:183)
at sbt.TestFramework$.sbt$TestFramework$
$withContextLoader(TestFramework.scala:195)
at sbt.TestFramework$$anonfun$6$$anonfun$apply$8$$anonfun
$7.apply(TestFramework.scala:183)
at sbt.TestFramework$$anonfun$6$$anonfun$apply$8$$anonfun
$7.apply(TestFramework.scala:183)
at sbt.Tests$$anonfun$makeParallel$1$$anonfun$apply
$7.apply(Tests.scala:113)
at sbt.Tests$$anonfun$makeParallel$1$$anonfun$apply
$7.apply(Tests.scala:113)
at sbt.std.Transform$$anon$3$$anonfun$apply$2.apply(System.scala:47)
at sbt.std.Transform$$anon$3$$anonfun$apply$2.apply(System.scala:47)
at sbt.std.Transform$$anon$5.work(System.scala:67)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:
221)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:
221)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:13)
at sbt.Execute.work(Execute.scala:227)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:221)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:221)
at sbt.CompletionService$$anon$1$$anon$2.call(CompletionService.scala:
26)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
## the spec
package com.test
import org.scalatest._
import org.scalatest.matchers.ShouldMatchers
class ServerSpec extends FeatureSpec with ShouldMatchers {
feature("test") {
scenario("test") {
true should equal(true)
}
}
}
## sbt build.sbt
name := "test"
version := "0.1"
scalaVersion := "2.9.1"
libraryDependencies ++= {
val ufVersion = "0.5.1"
Seq(
"net.databinder" %% "unfiltered-filter" % ufVersion,
"net.databinder" %% "unfiltered-jetty" % ufVersion,
"net.databinder" %% "unfiltered-json" % ufVersion,
"net.databinder" %% "unfiltered-scalatest" % ufVersion,
"org.scalatest" %% "scalatest" % "1.6.1" % "test"
)
}
--
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
I don't mean to start a long debate on the subject, but isn't backward
compatibility far more useful than forward?
As a Scala user, a problem I'm going to frequently face when upgrading
from, say, 2.9.0 to 2.9.1 is that the dozens of third-party libraries
I make use of will likely not be updated for 2.9.1, or perhaps not as
quickly as I like. So I'm forced to remain on 2.9.0 until every single
one of the third party libraries that I use has been recompiled and
reissued by its extremely diligent maintainer.
The only value I can imagine from forward compatibility is that if I
were using 2.9.0, and one of my third party library providers moved on
to 2.9.1, I could make use of their new library without having to
upgrade to 2.9.1 myself. But if I had backward compatibility, I could
just upgrade to 2.9.1 in order to use that new library, and benefit
from all the bug fixes in 2.9.1 to boot.
Am I missing some great benefit of forward compatibility? Because it
doesn't seem worth the trouble. Might as well have no inter-release
compatibility and spend the extra time on new features.
So I deploy
a zip file, I deploy it to scala-tools under each artifact ID, and
that gets mirrored to Maven central. So the same 1.6.1 release, which
works for Scala 2.9.x, gets released in a lot of different places. But
it is always the same exact bits.
Hi,
Here you can find the sbt project that shows the exception when trying
to run sbt test.
https://github.com/vvilhonen/binarybackward
Also requires sbt:
https://github.com/harrah/xsbt/wiki
I'll dig into what this user's problem is. One thing I'll try is to
deploy a snapshot built with 2.9.1 and see if that has the same
problem.
Methinks a pom somewhere is doing the wrong thing
Well done Todd!I'm glad you could figure out the bit that was messing up the build.