The Artima Developer Community
Sponsored Link

ScalaTest/ScalaUtils Forum
doesn't work with scala-2.7.0-RC2

2 replies on 1 page. Most recent reply: Mar 6, 2008 12:20 AM by Jonas Bonér

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Zemian Deng

Posts: 49
Nickname: zdeng
Registered: Jan, 2008

doesn't work with scala-2.7.0-RC2 Posted: Feb 15, 2008 7:51 PM
Reply to this message Reply
Advertisement
Hi,
I tried scalatest with latest scala and it won't compile. But it does work with 2.6.1-final. Is there something special about the RC2 release?

powerbookg4:demo zemian$ /opt/scala-2.7.0-RC2/bin/scalac -classpath /opt/scalatest/scalatest-0.9.1.jar:. ScalaTestDemo.scala
Exception in thread "main" java.lang.Error: Unknown type: ()java.lang.Class
at scala.tools.nsc.Global.abort(Global.scala:150)
at scala.tools.nsc.backend.icode.TypeKinds$class.toTypeKind(TypeKinds.scala:459)
at scala.tools.nsc.backend.icode.ICodes.toTypeKind(ICodes.scala:21)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$addMethodParams$1.ap ply(GenICode.scala:1549)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$addMethodParams$1.ap ply(GenICode.scala:1548)
at scala.List.foreach(List.scala:763)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.addMethodParams(GenICode.scal a:1548)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:108)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode .scala:70)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode .scala:70)
at scala.List.foreach(List.scala:763)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:70)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:134)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:88)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode .scala:70)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode .scala:70)
at scala.List.foreach(List.scala:763)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:70)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:80)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:66)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.apply(GenICode.scala:62)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:247)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:233)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:233)
at scala.Iterator$class.foreach(Iterator.scala:382)
at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:255)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:233)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.run(GenICode.scala:55)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:545)
at scala.tools.nsc.Global$Run.compile(Global.scala:629)
at scala.tools.nsc.Main$.process(Main.scala:86)
at scala.tools.nsc.Main$.main(Main.scala:107)
at scala.tools.nsc.Main.main(Main.scala)


Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: doesn't work with scala-2.7.0-RC2 Posted: Feb 16, 2008 3:02 PM
Reply to this message Reply
I've noticed we've needed to recompile between releases. If you'd like to recompile yourself, you can grab the latest release from the source and just use 2.7.0. I haven't tried that yet. Still on 2.6.1-final.

https://scalatest.dev.java.net/source/browse/scalatest/

If you want to compile ScalaTest 0.9.1 instead of the latest, use release-0.9.1 on:

https://scalatest.dev.java.net/source/browse/scalatest/tags/

Sorry for the trouble. I believe this is an of issue with Scala currently requiring a recompile from release to release.

Jonas Bonér

Posts: 5
Nickname: jboner
Registered: Dec, 2007

Re: doesn't work with scala-2.7.0-RC2 Posted: Mar 6, 2008 12:20 AM
Reply to this message Reply
If you want to build with Scala 2.7.0 then you have to change line 30 in SuiteRunner.scala to:

val constructor: Constructor[_] forSome {type T <: AnyRef} = suite.getClass.getConstructor(Array[java.lang.Class[_]]())

Then it compiles fine.

/Jonas

Flat View: This topic has 2 replies on 1 page
Topic: is scalatest still active? Previous Topic   Next Topic Topic: space a separator for runpath

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use