New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uncaught exception during compilation: java.lang.AssertionError: assertion failed: value stubbing #6640
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6640?orig=1
|
@gaydenko said: https://groups.google.com/forum/#!topic/scala-user/FHSlXMklNso |
@retronym said: If you move the
After adding the following: libraryDependencies += "org.mockito" % "mockito-all" % "1.9.0" Both the reduced and originally reported files compile successfully. But no doubt we should issue this error in both cases. It will be interesting to piece together the circumstances that lead do that assertion error during unpickling. |
@dcsobral said: |
@retronym said: |
@gaydenko said (edited on Nov 9, 2012 6:59:35 PM UTC): |
@dcsobral said: |
@retronym said: ~/code/scratch1 diff -u AllBuild.scala AllBuild2.scala
--- AllBuild.scala 2012-11-09 21:57:00.000000000 +0100
+++ AllBuild2.scala 2012-11-09 21:59:29.000000000 +0100
@@ -10,6 +10,7 @@
private lazy val mailDep = "javax.mail" % "mail" % "1.4.5"
private lazy val swingDep = "org.scala-lang" % "scala-swing" % scalaInUse
private lazy val junitDep = "junit" % "junit" % "4.8.2"
+ private lazy val scalaActorDep = "org.scala-lang" % "scala-actors" % scalaInUse
override lazy val settings = super.settings ++ Seq(
scalaVersion := scalaInUse,
@@ -29,7 +30,7 @@
lazy val zgsLib = Project("zgs-lib", file("zgs-kit/zgs-lib")) settings(
name := "zgs-lib",
- libraryDependencies ++= Seq(swingDep, mailDep)
+ libraryDependencies ++= Seq(swingDep, mailDep, scalaActorDep)
) |
@gaydenko said: Daniel, aha, any compiler exception is a compiler bug. |
@retronym said: Are you by any chance referring to |
@gaydenko said (edited on Nov 9, 2012 10:02:20 PM UTC): import javax.swing.SwingWorker
import scala.swing._
...
protected class SwiWorker[T](parent : Component, msg : String, job : => Answer[T], showPost : Boolean,
postMsg : String, postJob : Answer[T] => Unit) extends SwingWorker[Answer[T],AnyRef] {
...
} Probably this import list is dangerous at some point: scala.swing package contains SwingWorker also. |
@retronym said: |
@gaydenko said: |
@adriaanm said (edited on Nov 9, 2012 10:22:02 PM UTC): [warn] creating stub symbol for value stubbing in package mockito (a classfile may be missing) the assertion java.lang.AssertionError: assertion failed: value stubbing
at scala.reflect.internal.Types$ThisType.<init>(Types.scala:1388) fails because we created a StubSymbol hoping that we could keep going a bit longer |
@gaydenko said: |
@adriaanm said: |
@retronym said: @adriaan: I'd suspected that, but couldn't muster the right keywords to find the commit. (Even when the universe was handing it to me on a plate: OP's crasher failed at a package "java.lang.AssertionError: assertion failed: value stubbing"!) |
@adriaanm said: |
@retronym said (edited on Nov 9, 2012 11:00:24 PM UTC): Indeed, scala-swing's dependency on scala-actors is an historical accident. I've raised #6441 to remedy this. Rather than depending on that actors JAR, you could change your code from: import scala.swing._
import javax.swing.SwingWorker
abstract class SwiWorker[T] extends SwingWorker[T,AnyRef] To: import scala.swing._
abstract class SwiWorker[T] extends javax.swing.SwingWorker[T,AnyRef] This will stop the compiler from searching for This would also work: import scala.swing.{SwingWorker => _, _}
import javax.swing.SwingWorker
abstract class SwiWorker[T] extends SwingWorker[T,AnyRef] |
@gaydenko said: |
@retronym said: |
@som-snytt said: |
Here's a compiler crasher reported on the Specs2 mailing list. I did not rule out the possibility of a dependency problem on specs2 RC2 artifact.
When one executes sbt test, it results in:
The text was updated successfully, but these errors were encountered: