Bill Venners | 13 Jun 2012 18:45
Favicon

2.10.0.M4 build problem

Hi All,

I'm trying to build ScalaTest under 2.10.0.M4, and I get this error:

BUILD FAILED
/Users/bv/nobkp/delus/r18for210M3/build.xml:115: The following error
occurred while executing this line:
jar:file:/Users/bv/.m2/repository/org/scala-lang/scala-compiler/2.10.0-M4/scala-compiler-2.10.0-M4.jar!/scala/tools/ant/antlib.xml:5:
taskdef A class needed by class scala.tools.ant.FastScalac cannot be
found: scala/reflect/internal/settings/AbsSettings

Can anyone shed light on this?

In case you want to investigate, the branch I'm trying to build is here:

https://scalatest.googlecode.com/svn/branches/r18for210M4

Just need to say "ant compile". This compiled fine under M3.

Thanks.

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

Eugene Burmako | 13 Jun 2012 18:49
Picon
Picon
Favicon
Gravatar

Re: 2.10.0.M4 build problem

Hey, you need to add scala-reflect.jar to the classpath of the compiler.

On Jun 13, 2012 6:45 PM, "Bill Venners" <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:

Hi All,

I'm trying to build ScalaTest under 2.10.0.M4, and I get this error:

BUILD FAILED
/Users/bv/nobkp/delus/r18for210M3/build.xml:115: The following error
occurred while executing this line:
jar:file:/Users/bv/.m2/repository/org/scala-lang/scala-compiler/2.10.0-M4/scala-compiler-2.10.0-M4.jar!/scala/tools/ant/antlib.xml:5:
taskdef A class needed by class scala.tools.ant.FastScalac cannot be
found: scala/reflect/internal/settings/AbsSettings

Can anyone shed light on this?

In case you want to investigate, the branch I'm trying to build is here:

https://scalatest.googlecode.com/svn/branches/r18for210M4

Just need to say "ant compile". This compiled fine under M3.

Thanks.

Bill
----
Bill Venners
Artima, Inc.
http://www.artima.com
Bill Venners | 13 Jun 2012 20:19
Favicon

Re: 2.10.0.M4 build problem

Hi Eugene,


Thanks for the tip!

Bill

On Wednesday, June 13, 2012 12:49:11 PM UTC-4, Eugene Burmako wrote:

Hey, you need to add scala-reflect.jar to the classpath of the compiler.

On Jun 13, 2012 6:45 PM, "Bill Venners" <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:

Hi All,

I'm trying to build ScalaTest under 2.10.0.M4, and I get this error:

BUILD FAILED
/Users/bv/nobkp/delus/r18for210M3/build.xml:115: The following error
occurred while executing this line:
jar:file:/Users/bv/.m2/repository/org/scala-lang/scala-compiler/2.10.0-M4/scala-compiler-2.10.0-M4.jar!/scala/tools/ant/antlib.xml:5:
taskdef A class needed by class scala.tools.ant.FastScalac cannot be
found: scala/reflect/internal/settings/AbsSettings

Can anyone shed light on this?

In case you want to investigate, the branch I'm trying to build is here:

https://scalatest.googlecode.com/svn/branches/r18for210M4

Just need to say "ant compile". This compiled fine under M3.

Thanks.

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

√iktor Ҡlang | 13 Jun 2012 20:27
Picon

Re: 2.10.0.M4 build problem



On Wed, Jun 13, 2012 at 8:19 PM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
Hi Eugene,

Thanks for the tip!

Looking forward to a published version of ScalaTest for 2.10.0-M4 Bill :-)
 

Bill


On Wednesday, June 13, 2012 12:49:11 PM UTC-4, Eugene Burmako wrote:

Hey, you need to add scala-reflect.jar to the classpath of the compiler.

On Jun 13, 2012 6:45 PM, "Bill Venners" <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:

Hi All,

I'm trying to build ScalaTest under 2.10.0.M4, and I get this error:

BUILD FAILED
/Users/bv/nobkp/delus/r18for210M3/build.xml:115: The following error
occurred while executing this line:
jar:file:/Users/bv/.m2/repository/org/scala-lang/scala-compiler/2.10.0-M4/scala-compiler-2.10.0-M4.jar!/scala/tools/ant/antlib.xml:5:
taskdef A class needed by class scala.tools.ant.FastScalac cannot be
found: scala/reflect/internal/settings/AbsSettings

Can anyone shed light on this?

In case you want to investigate, the branch I'm trying to build is here:

https://scalatest.googlecode.com/svn/branches/r18for210M4

Just need to say "ant compile". This compiled fine under M3.

Thanks.

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




--
Viktor Klang

Akka Tech Lead
Typesafe - The software stack for applications that scale

Twitter: <at> viktorklang

Bill Venners | 14 Jun 2012 00:36
Favicon

Re: 2.10.0.M4 build problem

Hi Viktor,


Working on it. Something changed in M4 related to implicit conversions on structural types. Not sure if it was intentional. Only breaks ScalaTests's tests of itself, so I'll be deploying probably after dinner tonight.

Bill

On Wednesday, June 13, 2012 2:27:17 PM UTC-4, √iktor Klang wrote:


On Wed, Jun 13, 2012 at 8:19 PM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
Hi Eugene,

Thanks for the tip!

Looking forward to a published version of ScalaTest for 2.10.0-M4 Bill :-)
 

Bill


On Wednesday, June 13, 2012 12:49:11 PM UTC-4, Eugene Burmako wrote:

Hey, you need to add scala-reflect.jar to the classpath of the compiler.

On Jun 13, 2012 6:45 PM, "Bill Venners" <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:

Hi All,

I'm trying to build ScalaTest under 2.10.0.M4, and I get this error:

BUILD FAILED
/Users/bv/nobkp/delus/r18for210M3/build.xml:115: The following error
occurred while executing this line:
jar:file:/Users/bv/.m2/repository/org/scala-lang/scala-compiler/2.10.0-M4/scala-compiler-2.10.0-M4.jar!/scala/tools/ant/antlib.xml:5:
taskdef A class needed by class scala.tools.ant.FastScalac cannot be
found: scala/reflect/internal/settings/AbsSettings

Can anyone shed light on this?

In case you want to investigate, the branch I'm trying to build is here:

https://scalatest.googlecode.com/svn/branches/r18for210M4

Just need to say "ant compile". This compiled fine under M3.

Thanks.

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




--
Viktor Klang

Akka Tech Lead
Typesafe - The software stack for applications that scale

Twitter: <at> viktorklang

Bill Venners | 14 Jun 2012 00:42
Favicon

Re: 2.10.0.M4 build problem

Hi Viktor,


To be precise it will break client code that was using those implicits prior to the scalatest_2.10.0-M4 release. I'll have more time to investigate tomorrow on the plane. If it looks like a bug to the powers that be, you can reproduce it by checking out this branch and doing an "ant compile":

https://scalatest.googlecode.com/svn/branches/structImplM4Prob

(Sorry haven't had time to finish our sbt build.)

Bill

On Wednesday, June 13, 2012 6:36:30 PM UTC-4, Bill Venners wrote:
Hi Viktor,

Working on it. Something changed in M4 related to implicit conversions on structural types. Not sure if it was intentional. Only breaks ScalaTests's tests of itself, so I'll be deploying probably after dinner tonight.

Bill

On Wednesday, June 13, 2012 2:27:17 PM UTC-4, √iktor Klang wrote:


On Wed, Jun 13, 2012 at 8:19 PM, Bill Venners <bill <at> artima.com> wrote:
Hi Eugene,

Thanks for the tip!

Looking forward to a published version of ScalaTest for 2.10.0-M4 Bill :-)
 

Bill


On Wednesday, June 13, 2012 12:49:11 PM UTC-4, Eugene Burmako wrote:

Hey, you need to add scala-reflect.jar to the classpath of the compiler.

On Jun 13, 2012 6:45 PM, "Bill Venners" <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:

Hi All,

I'm trying to build ScalaTest under 2.10.0.M4, and I get this error:

BUILD FAILED
/Users/bv/nobkp/delus/r18for210M3/build.xml:115: The following error
occurred while executing this line:
jar:file:/Users/bv/.m2/repository/org/scala-lang/scala-compiler/2.10.0-M4/scala-compiler-2.10.0-M4.jar!/scala/tools/ant/antlib.xml:5:
taskdef A class needed by class scala.tools.ant.FastScalac cannot be
found: scala/reflect/internal/settings/AbsSettings

Can anyone shed light on this?

In case you want to investigate, the branch I'm trying to build is here:

https://scalatest.googlecode.com/svn/branches/r18for210M4

Just need to say "ant compile". This compiled fine under M3.

Thanks.

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




--
Viktor Klang

Akka Tech Lead
Typesafe - The software stack for applications that scale

Twitter: <at> viktorklang

Bill Venners | 14 Jun 2012 01:06
Favicon

Re: 2.10.0.M4 build problem

Hi All,


By the way I also get a problem when I try to run the tests. I think I got something like this on M3 and never had time to investigate. I finally should have the time soon, but in case it helps, this is the exception:

runtest:
[scalatest] *** RUN ABORTED *** (21 seconds, 76 milliseconds)
[scalatest]   java.lang.VerifyError: (class: org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature: (Lorg/scalatest/BeforeAndAfterEachFunctions;Ljava/lang/String;Lorg/scalatest/Reporter;Lorg/scalatest/Stopper;Lscala/collection/immutable/Map;Lorg/scalatest/Tracker;)V) Register 16 contains wrong type
[scalatest]   at org.scalatest.BeforeAndAfterFunctionsExtendingSuite.<init>(BeforeAndAfterFunctionsSuite.scala:415)
[scalatest]   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[scalatest]   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[scalatest]   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[scalatest]   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[scalatest]   at java.lang.Class.newInstance0(Class.java:355)
[scalatest]   at java.lang.Class.newInstance(Class.java:308)
[scalatest]   at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:40)
[scalatest]   at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:34)
[scalatest]   at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:239)
[scalatest]   ...

If anyone can point me in the right direction for this one I'd appreciate it. And, if you want to see it for yourself, check out this branch:

https://scalatest.googlecode.com/svn/branches/r18for210M4

And type:

ant compile; ant gencode; ant test

Thanks.

Bill

On Wednesday, June 13, 2012 6:42:39 PM UTC-4, Bill Venners wrote:
Hi Viktor,

To be precise it will break client code that was using those implicits prior to the scalatest_2.10.0-M4 release. I'll have more time to investigate tomorrow on the plane. If it looks like a bug to the powers that be, you can reproduce it by checking out this branch and doing an "ant compile":


(Sorry haven't had time to finish our sbt build.)

Bill

On Wednesday, June 13, 2012 6:36:30 PM UTC-4, Bill Venners wrote:
Hi Viktor,

Working on it. Something changed in M4 related to implicit conversions on structural types. Not sure if it was intentional. Only breaks ScalaTests's tests of itself, so I'll be deploying probably after dinner tonight.

Bill

On Wednesday, June 13, 2012 2:27:17 PM UTC-4, √iktor Klang wrote:


On Wed, Jun 13, 2012 at 8:19 PM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
Hi Eugene,

Thanks for the tip!

Looking forward to a published version of ScalaTest for 2.10.0-M4 Bill :-)
 

Bill


On Wednesday, June 13, 2012 12:49:11 PM UTC-4, Eugene Burmako wrote:

Hey, you need to add scala-reflect.jar to the classpath of the compiler.

On Jun 13, 2012 6:45 PM, "Bill Venners" <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:

Hi All,

I'm trying to build ScalaTest under 2.10.0.M4, and I get this error:

BUILD FAILED
/Users/bv/nobkp/delus/r18for210M3/build.xml:115: The following error
occurred while executing this line:
jar:file:/Users/bv/.m2/repository/org/scala-lang/scala-compiler/2.10.0-M4/scala-compiler-2.10.0-M4.jar!/scala/tools/ant/antlib.xml:5:
taskdef A class needed by class scala.tools.ant.FastScalac cannot be
found: scala/reflect/internal/settings/AbsSettings

Can anyone shed light on this?

In case you want to investigate, the branch I'm trying to build is here:

https://scalatest.googlecode.com/svn/branches/r18for210M4

Just need to say "ant compile". This compiled fine under M3.

Thanks.

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




--
Viktor Klang

Akka Tech Lead
Typesafe - The software stack for applications that scale

Twitter: <at> viktorklang

Bill Venners | 15 Jun 2012 21:39
Favicon

Re: 2.10.0.M4 build problem

Hi All,


I've made a small example that shows the compilation error I'm experiencing in M4. This small example compiles and runs fine under 2.9.1 and 2.10.0-M3. But it doesn't compile under 2.10.0-M4. I'll make a ticket for this shortly, but I thought I'd post it here as well. Here's the code:

object M4Prob extends App {

  abstract class LengthWrapper {
    def length: Long
  }

  implicit def convertGetLengthFieldToLongLengthWrapper(o: { val getLength: Long }): LengthWrapper =
    new LengthWrapper {
      def length = o.getLength
    }

  implicit def convertHasLongGetLengthFieldToLengthShouldWrapper[T <: AnyRef { val getLength: Long}](o: T): LengthShouldWrapper[T] = new LengthShouldWrapper[T](o)

  final class LengthShouldWrapper[A <: AnyRef <% LengthWrapper](left: A) {

    def should(o: Any) {
      println("Length was: " + left.length)
    }
  }

  class Lengthy {
    def getLength: Long = 99L
  }

  (new Lengthy) should "howdy"
}

Under 2.9.1 and 2.10.0-M3, it compiles and when you run it, it correctly prints:

Length was: 99

Under 2.10.0-M3, it fails to compile with this error message:

M4Prob.scala:26: error: value should is not a member of M4Prob.Lengthy
  (new Lengthy) should "howdy"
                ^
one error found

One other problem with M4, which I imagine has been reported and may even be fixed by now, is that M4 is giving a deprecation warning at the use sites of Manifest instead of just the declaration sites. ScalaTest is using Manifest for its intercept method, for example, and yes when I compile ScalaTest I should get a deprecation warning where intercept is defined in trait Assertions. But what's happening is that ScalaTest users are getting a deprecation warning about Manifest everywhere they invoke intercept (and several other methods). I got so many such warnings when compiling ScalaTest's own tests had to turn off deprecation warnings to see what the errors were. Anyway, if I can't find a ticket for that one I'll submit one.

Lastly, I still have the runtime error that prevents me from running ScalaTest's tests of itself under M4. I will post a ticket about that one too, but if anyone has any ideas from the error message I'd appreciate a tip. Here's what that looks like:

runtest:
[scalatest] *** RUN ABORTED *** (21 seconds, 76 milliseconds)
[scalatest]   java.lang.VerifyError: (class: org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature: (Lorg/scalatest/BeforeAndAfterEachFunctions;Ljava/lang/String;Lorg/scalatest/Reporter;Lorg/scalatest/Stopper;Lscala/collection/immutable/Map;Lorg/scalatest/Tracker;)V) Register 16 contains wrong type
[scalatest]   at org.scalatest.BeforeAndAfterFunctionsExtendingSuite.<init>(BeforeAndAfterFunctionsSuite.scala:415)
[scalatest]   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[scalatest]   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[scalatest]   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[scalatest]   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[scalatest]   at java.lang.Class.newInstance0(Class.java:355)
[scalatest]   at java.lang.Class.newInstance(Class.java:308)
[scalatest]   at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:40)
[scalatest]   at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:34)
[scalatest]   at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:239)
[scalatest]   ...

If anyone can point me in the right direction for this one I'd appreciate it. And, if you want to see it for yourself, check out this branch:


And type:

ant compile; ant gencode; ant test

I was able to deploy a 1.8-SNAPSHOT of ScalaTest under 2.10.0-M4, by commenting out the tests that were hitting the length/size structural type implicit conversion compile problem. That allowed me to compile. The tests didn't run, but I deployed anyway, and at least two users have reported it is working for them. Viktor can't get Akka's tests to compile, though, and suspects ScalaTest's M4 build could be the source of the problem. Best way to find out is to solve the compilation and test running problems so I can deploy a clean build.

Thanks.

Bill

On Wednesday, June 13, 2012 4:06:45 PM UTC-7, Bill Venners wrote:
Hi All,

By the way I also get a problem when I try to run the tests. I think I got something like this on M3 and never had time to investigate. I finally should have the time soon, but in case it helps, this is the exception:

runtest:
[scalatest] *** RUN ABORTED *** (21 seconds, 76 milliseconds)
[scalatest]   java.lang.VerifyError: (class: org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature: (Lorg/scalatest/BeforeAndAfterEachFunctions;Ljava/lang/String;Lorg/scalatest/Reporter;Lorg/scalatest/Stopper;Lscala/collection/immutable/Map;Lorg/scalatest/Tracker;)V) Register 16 contains wrong type
[scalatest]   at org.scalatest.BeforeAndAfterFunctionsExtendingSuite.<init>(BeforeAndAfterFunctionsSuite.scala:415)
[scalatest]   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[scalatest]   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[scalatest]   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[scalatest]   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[scalatest]   at java.lang.Class.newInstance0(Class.java:355)
[scalatest]   at java.lang.Class.newInstance(Class.java:308)
[scalatest]   at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:40)
[scalatest]   at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:34)
[scalatest]   at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:239)
[scalatest]   ...

If anyone can point me in the right direction for this one I'd appreciate it. And, if you want to see it for yourself, check out this branch:


And type:

ant compile; ant gencode; ant test

Thanks.

Bill

On Wednesday, June 13, 2012 6:42:39 PM UTC-4, Bill Venners wrote:
Hi Viktor,

To be precise it will break client code that was using those implicits prior to the scalatest_2.10.0-M4 release. I'll have more time to investigate tomorrow on the plane. If it looks like a bug to the powers that be, you can reproduce it by checking out this branch and doing an "ant compile":


(Sorry haven't had time to finish our sbt build.)

Bill

On Wednesday, June 13, 2012 6:36:30 PM UTC-4, Bill Venners wrote:
Hi Viktor,

Working on it. Something changed in M4 related to implicit conversions on structural types. Not sure if it was intentional. Only breaks ScalaTests's tests of itself, so I'll be deploying probably after dinner tonight.

Bill

On Wednesday, June 13, 2012 2:27:17 PM UTC-4, √iktor Klang wrote:


On Wed, Jun 13, 2012 at 8:19 PM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
Hi Eugene,

Thanks for the tip!

Looking forward to a published version of ScalaTest for 2.10.0-M4 Bill :-)
 

Bill


On Wednesday, June 13, 2012 12:49:11 PM UTC-4, Eugene Burmako wrote:

Hey, you need to add scala-reflect.jar to the classpath of the compiler.

On Jun 13, 2012 6:45 PM, "Bill Venners" <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:

Hi All,

I'm trying to build ScalaTest under 2.10.0.M4, and I get this error:

BUILD FAILED
/Users/bv/nobkp/delus/r18for210M3/build.xml:115: The following error
occurred while executing this line:
jar:file:/Users/bv/.m2/repository/org/scala-lang/scala-compiler/2.10.0-M4/scala-compiler-2.10.0-M4.jar!/scala/tools/ant/antlib.xml:5:
taskdef A class needed by class scala.tools.ant.FastScalac cannot be
found: scala/reflect/internal/settings/AbsSettings

Can anyone shed light on this?

In case you want to investigate, the branch I'm trying to build is here:

https://scalatest.googlecode.com/svn/branches/r18for210M4

Just need to say "ant compile". This compiled fine under M3.

Thanks.

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




--
Viktor Klang

Akka Tech Lead
Typesafe - The software stack for applications that scale

Twitter: <at> viktorklang

√iktor Ҡlang | 15 Jun 2012 22:47
Picon

Re: 2.10.0.M4 build problem

Getting ScalaTest, ScalaCheck and Specs2 is crucial to get feedback from the community on M4.

Where do we go from here?

Cheers,
V

On Jun 15, 2012 9:39 PM, "Bill Venners" <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
Hi All,

I've made a small example that shows the compilation error I'm experiencing in M4. This small example compiles and runs fine under 2.9.1 and 2.10.0-M3. But it doesn't compile under 2.10.0-M4. I'll make a ticket for this shortly, but I thought I'd post it here as well. Here's the code:

object M4Prob extends App {

  abstract class LengthWrapper {
    def length: Long
  }

  implicit def convertGetLengthFieldToLongLengthWrapper(o: { val getLength: Long }): LengthWrapper =
    new LengthWrapper {
      def length = o.getLength
    }

  implicit def convertHasLongGetLengthFieldToLengthShouldWrapper[T <: AnyRef { val getLength: Long}](o: T): LengthShouldWrapper[T] = new LengthShouldWrapper[T](o)

  final class LengthShouldWrapper[A <: AnyRef <% LengthWrapper](left: A) {

    def should(o: Any) {
      println("Length was: " + left.length)
    }
  }

  class Lengthy {
    def getLength: Long = 99L
  }

  (new Lengthy) should "howdy"
}

Under 2.9.1 and 2.10.0-M3, it compiles and when you run it, it correctly prints:

Length was: 99

Under 2.10.0-M3, it fails to compile with this error message:

M4Prob.scala:26: error: value should is not a member of M4Prob.Lengthy
  (new Lengthy) should "howdy"
                ^
one error found

One other problem with M4, which I imagine has been reported and may even be fixed by now, is that M4 is giving a deprecation warning at the use sites of Manifest instead of just the declaration sites. ScalaTest is using Manifest for its intercept method, for example, and yes when I compile ScalaTest I should get a deprecation warning where intercept is defined in trait Assertions. But what's happening is that ScalaTest users are getting a deprecation warning about Manifest everywhere they invoke intercept (and several other methods). I got so many such warnings when compiling ScalaTest's own tests had to turn off deprecation warnings to see what the errors were. Anyway, if I can't find a ticket for that one I'll submit one.

Lastly, I still have the runtime error that prevents me from running ScalaTest's tests of itself under M4. I will post a ticket about that one too, but if anyone has any ideas from the error message I'd appreciate a tip. Here's what that looks like:

runtest:
[scalatest] *** RUN ABORTED *** (21 seconds, 76 milliseconds)
[scalatest]   java.lang.VerifyError: (class: org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature: (Lorg/scalatest/BeforeAndAfterEachFunctions;Ljava/lang/String;Lorg/scalatest/Reporter;Lorg/scalatest/Stopper;Lscala/collection/immutable/Map;Lorg/scalatest/Tracker;)V) Register 16 contains wrong type
[scalatest]   at org.scalatest.BeforeAndAfterFunctionsExtendingSuite.<init>(BeforeAndAfterFunctionsSuite.scala:415)
[scalatest]   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[scalatest]   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[scalatest]   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[scalatest]   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[scalatest]   at java.lang.Class.newInstance0(Class.java:355)
[scalatest]   at java.lang.Class.newInstance(Class.java:308)
[scalatest]   at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:40)
[scalatest]   at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:34)
[scalatest]   at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:239)
[scalatest]   ...

If anyone can point me in the right direction for this one I'd appreciate it. And, if you want to see it for yourself, check out this branch:


And type:

ant compile; ant gencode; ant test

I was able to deploy a 1.8-SNAPSHOT of ScalaTest under 2.10.0-M4, by commenting out the tests that were hitting the length/size structural type implicit conversion compile problem. That allowed me to compile. The tests didn't run, but I deployed anyway, and at least two users have reported it is working for them. Viktor can't get Akka's tests to compile, though, and suspects ScalaTest's M4 build could be the source of the problem. Best way to find out is to solve the compilation and test running problems so I can deploy a clean build.

Thanks.

Bill

On Wednesday, June 13, 2012 4:06:45 PM UTC-7, Bill Venners wrote:
Hi All,

By the way I also get a problem when I try to run the tests. I think I got something like this on M3 and never had time to investigate. I finally should have the time soon, but in case it helps, this is the exception:

runtest:
[scalatest] *** RUN ABORTED *** (21 seconds, 76 milliseconds)
[scalatest]   java.lang.VerifyError: (class: org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature: (Lorg/scalatest/BeforeAndAfterEachFunctions;Ljava/lang/String;Lorg/scalatest/Reporter;Lorg/scalatest/Stopper;Lscala/collection/immutable/Map;Lorg/scalatest/Tracker;)V) Register 16 contains wrong type
[scalatest]   at org.scalatest.BeforeAndAfterFunctionsExtendingSuite.<init>(BeforeAndAfterFunctionsSuite.scala:415)
[scalatest]   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[scalatest]   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[scalatest]   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[scalatest]   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[scalatest]   at java.lang.Class.newInstance0(Class.java:355)
[scalatest]   at java.lang.Class.newInstance(Class.java:308)
[scalatest]   at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:40)
[scalatest]   at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:34)
[scalatest]   at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:239)
[scalatest]   ...

If anyone can point me in the right direction for this one I'd appreciate it. And, if you want to see it for yourself, check out this branch:


And type:

ant compile; ant gencode; ant test

Thanks.

Bill

On Wednesday, June 13, 2012 6:42:39 PM UTC-4, Bill Venners wrote:
Hi Viktor,

To be precise it will break client code that was using those implicits prior to the scalatest_2.10.0-M4 release. I'll have more time to investigate tomorrow on the plane. If it looks like a bug to the powers that be, you can reproduce it by checking out this branch and doing an "ant compile":


(Sorry haven't had time to finish our sbt build.)

Bill

On Wednesday, June 13, 2012 6:36:30 PM UTC-4, Bill Venners wrote:
Hi Viktor,

Working on it. Something changed in M4 related to implicit conversions on structural types. Not sure if it was intentional. Only breaks ScalaTests's tests of itself, so I'll be deploying probably after dinner tonight.

Bill

On Wednesday, June 13, 2012 2:27:17 PM UTC-4, √iktor Klang wrote:


On Wed, Jun 13, 2012 at 8:19 PM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
Hi Eugene,

Thanks for the tip!

Looking forward to a published version of ScalaTest for 2.10.0-M4 Bill :-)
 

Bill


On Wednesday, June 13, 2012 12:49:11 PM UTC-4, Eugene Burmako wrote:

Hey, you need to add scala-reflect.jar to the classpath of the compiler.

On Jun 13, 2012 6:45 PM, "Bill Venners" <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:

Hi All,

I'm trying to build ScalaTest under 2.10.0.M4, and I get this error:

BUILD FAILED
/Users/bv/nobkp/delus/r18for210M3/build.xml:115: The following error
occurred while executing this line:
jar:file:/Users/bv/.m2/repository/org/scala-lang/scala-compiler/2.10.0-M4/scala-compiler-2.10.0-M4.jar!/scala/tools/ant/antlib.xml:5:
taskdef A class needed by class scala.tools.ant.FastScalac cannot be
found: scala/reflect/internal/settings/AbsSettings

Can anyone shed light on this?

In case you want to investigate, the branch I'm trying to build is here:

https://scalatest.googlecode.com/svn/branches/r18for210M4

Just need to say "ant compile". This compiled fine under M3.

Thanks.

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




--
Viktor Klang

Akka Tech Lead
Typesafe - The software stack for applications that scale

Twitter: <at> viktorklang

Jason Zaugg | 15 Jun 2012 23:07
Picon
Gravatar

Re: 2.10.0.M4 build problem

On Fri, Jun 15, 2012 at 9:39 PM, Bill Venners <bill@...> wrote:
> I've made a small example that shows the compilation error I'm experiencing
> in M4. This small example compiles and runs fine under 2.9.1 and 2.10.0-M3.
> But it doesn't compile under 2.10.0-M4. I'll make a ticket for this shortly,
> but I thought I'd post it here as well. Here's the code:
>
> object M4Prob extends App {
>
>   abstract class LengthWrapper {
>     def length: Long
>   }
>
>   implicit def convertGetLengthFieldToLongLengthWrapper(o: { val getLength:
> Long }): LengthWrapper =
>     new LengthWrapper {
>       def length = o.getLength
>     }
>
>   implicit def convertHasLongGetLengthFieldToLengthShouldWrapper[T <: AnyRef
> { val getLength: Long}](o: T): LengthShouldWrapper[T] = new
> LengthShouldWrapper[T](o)
>
>   final class LengthShouldWrapper[A <: AnyRef <% LengthWrapper](left: A) {
>
>     def should(o: Any) {
>       println("Length was: " + left.length)
>     }
>   }
>
>   class Lengthy {
>     def getLength: Long = 99L
>   }
>
>   (new Lengthy) should "howdy"
> }
>
> Under 2.9.1 and 2.10.0-M3, it compiles and when you run it, it correctly
> prints:
>
> Length was: 99
>
> Under 2.10.0-M3, it fails to compile with this error message:
>
> M4Prob.scala:26: error: value should is not a member of M4Prob.Lengthy
>   (new Lengthy) should "howdy"
>                 ^
> one error found

AFAICT, you were relying on a bug. I'm not sure exactly when this
changed. Trimming the problem down little:

object M4Prob extends App {
  trait Lengthy {
    def getLength: Any
  }

  val l: Lengthy = null

  l: {val getLength: Any} // error here is correct: def is not a subtype of val
  l: {def getLength: Any} // okay
}

> One other problem with M4, which I imagine has been reported and may even be
> fixed by now, is that M4 is giving a deprecation warning at the use sites of
> Manifest instead of just the declaration sites. ScalaTest is using Manifest
> for its intercept method, for example, and yes when I compile ScalaTest I
> should get a deprecation warning where intercept is defined in trait
> Assertions. But what's happening is that ScalaTest users are getting a
> deprecation warning about Manifest everywhere they invoke intercept (and
> several other methods). I got so many such warnings when compiling
> ScalaTest's own tests had to turn off deprecation warnings to see what the
> errors were. Anyway, if I can't find a ticket for that one I'll submit one.

The migration path from manifests to class tags does need some smoothing,
but I suggest you would be best served to change your 2.10.x branch to heed
the warnings and switch away from manifests. Maybe Eugene can comment with
specific advice on what to change here.

> Lastly, I still have the runtime error that prevents me from running
> ScalaTest's tests of itself under M4. I will post a ticket about that one
> too, but if anyone has any ideas from the error message I'd appreciate a
> tip. Here's what that looks like:
>
> runtest:
> [scalatest] *** RUN ABORTED *** (21 seconds, 76 milliseconds)
> [scalatest]   java.lang.VerifyError: (class:
> org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature:

Ouch.

-jason

Paul Phillips | 15 Jun 2012 23:36

Re: 2.10.0.M4 build problem


On Fri, Jun 15, 2012 at 2:07 PM, Jason Zaugg <jzaugg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
AFAICT, you were relying on a bug. I'm not sure exactly when this
changed.

commit 01f6ed8e22d02811fe62b9183d9f84bdda5ede4b
Date:   6 weeks ago

    Fix for one of the oldest open soundness bugs.
    
    Closes SI-963, since it was one of my random 30 it won the prize.
    The trick after adding the stability check (which has been sitting
    there commented out for 3+ years) was that implicit search depended
    on the wrongness, because memberWildcardType would create scopes
    with members of the form
    
      ?{ val name: tp }
    
    And since a def shouldn't match that, fixing it broke everything
    until I flipped it around: memberWildcardType should be seeking
    
      ?{ def name: tp }
    
    It could also search for a mutable value: the relevant quality
    is that it not be stable so it doesn't have a tighter type than
    the members it hopes to match.

Jason Zaugg | 16 Jun 2012 00:10
Picon
Gravatar

Re: 2.10.0.M4 build problem

On Fri, Jun 15, 2012 at 11:07 PM, Jason Zaugg <jzaugg@...> wrote:
>> Lastly, I still have the runtime error that prevents me from running
>> ScalaTest's tests of itself under M4. I will post a ticket about that one
>> too, but if anyone has any ideas from the error message I'd appreciate a
>> tip. Here's what that looks like:
>>
>> runtest:
>> [scalatest] *** RUN ABORTED *** (21 seconds, 76 milliseconds)
>> [scalatest]   java.lang.VerifyError: (class:
>> org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature:
>
> Ouch.

I've trimmed that one down to size [1] and also reported the spurious
warnings emitted in your build [2].

-jason

[1] https://issues.scala-lang.org/browse/SI-5929?focusedCommentId=58220&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-58220
[2] https://issues.scala-lang.org/browse/SI-5932

Paul Phillips | 16 Jun 2012 00:27

Re: 2.10.0.M4 build problem

Oh, the interesting things one learns trying to compile scalatest against the right version of scalacheck.  It didn't compile, actually, which led me to this little bundle of badness.


  case class Foo(x: Int)(implicit y: Foo) { }
  def f(args: List[Foo]) = if (false) args map (_.copy()) else args

What return type is to be inferred for f? In m3 it is List[Foo].  In m4 it is List[Object], because of https://issues.scala-lang.org/browse/SI-5907 .

In scalatest, the affected method is

  private def getArgsWithSpecifiedNames(argNames: Option[List[String]], scalaCheckArgs: Prop.Args) = {
    if (argNames.isDefined) {
      // length of scalaCheckArgs should equal length of argNames
      val zipped = argNames.get zip scalaCheckArgs
      zipped map { case (argName, arg) => arg.copy(label = argName) }
    }
    else
      scalaCheckArgs
  }

Bill Venners | 16 Jun 2012 01:23
Favicon

Re: 2.10.0.M4 build problem

Hi Jason,

On Friday, June 15, 2012 2:07:21 PM UTC-7, Jason Zaugg wrote:

On Fri, Jun 15, 2012 at 9:39 PM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
> I've made a small example that shows the compilation error I'm experiencing
> in M4. This small example compiles and runs fine under 2.9.1 and 2.10.0-M3.
> But it doesn't compile under 2.10.0-M4. I'll make a ticket for this shortly,
> but I thought I'd post it here as well. Here's the code:
>
> object M4Prob extends App {
>
>   abstract class LengthWrapper {
>     def length: Long
>   }
>
>   implicit def convertGetLengthFieldToLongLengthWrapper(o: { val getLength:
> Long }): LengthWrapper =
>     new LengthWrapper {
>       def length = o.getLength
>     }
>
>   implicit def convertHasLongGetLengthFieldToLengthShouldWrapper[T <: AnyRef
> { val getLength: Long}](o: T): LengthShouldWrapper[T] = new
> LengthShouldWrapper[T](o)
>
>   final class LengthShouldWrapper[A <: AnyRef <% LengthWrapper](left: A) {
>
>     def should(o: Any) {
>       println("Length was: " + left.length)
>     }
>   }
>
>   class Lengthy {
>     def getLength: Long = 99L
>   }
>
>   (new Lengthy) should "howdy"
> }
>
> Under 2.9.1 and 2.10.0-M3, it compiles and when you run it, it correctly
> prints:
>
> Length was: 99
>
> Under 2.10.0-M3, it fails to compile with this error message:
>
> M4Prob.scala:26: error: value should is not a member of M4Prob.Lengthy
>   (new Lengthy) should "howdy"
>                 ^
> one error found

AFAICT, you were relying on a bug. I'm not sure exactly when this
changed. Trimming the problem down little:

object M4Prob extends App {
  trait Lengthy {
    def getLength: Any
  }

  val l: Lengthy = null

  l: {val getLength: Any} // error here is correct: def is not a subtype of val
  l: {def getLength: Any} // okay
}

Oh, well if so that's actually just a bug in my short example. In ScalaTest there's an implicit conversion on both:

 /**
   * This implicit conversion method converts an object with a <code>getLength</code> field of type <code>Int</code> to a
   * <code>LengthWrapper</code>, to enable that object to be used with the <code>have length (7)</code> syntax.
   */
  implicit def convertGetLengthFieldToIntLengthWrapper(o: { val getLength: Int }): LengthWrapper =
    new LengthWrapper {
      def length: Long = o.getLength
    }

  /**
   * This implicit conversion method converts an object with a <code>getLength</code> method of type <code>Int</code> to a
   * <code>LengthWrapper</code>, to enable that object to be used with the <code>have length (7)</code> syntax.
   */
  implicit def convertGetLengthMethodToIntLengthWrapper(o: { def getLength(): Int }): LengthWrapper =
    new LengthWrapper {
      def length: Long = o.getLength()
    }

 
> One other problem with M4, which I imagine has been reported and may even be
> fixed by now, is that M4 is giving a deprecation warning at the use sites of
> Manifest instead of just the declaration sites. ScalaTest is using Manifest
> for its intercept method, for example, and yes when I compile ScalaTest I
> should get a deprecation warning where intercept is defined in trait
> Assertions. But what's happening is that ScalaTest users are getting a
> deprecation warning about Manifest everywhere they invoke intercept (and
> several other methods). I got so many such warnings when compiling
> ScalaTest's own tests had to turn off deprecation warnings to see what the
> errors were. Anyway, if I can't find a ticket for that one I'll submit one.

The migration path from manifests to class tags does need some smoothing,
but I suggest you would be best served to change your 2.10.x branch to heed
the warnings and switch away from manifests. Maybe Eugene can comment with
specific advice on what to change here.

It is really not practical for me to have a different branch after 2.10 is released final, because I want to support 2.8 and 2.9 as well. I'll drop 2.8 support after ScalaTest 2.0 probably, but I expect I'll support 2.9 for a long time to come. A lot of business users don't upgrade (for example, Twitter) right away after a new major Scala release comes out. The best I could do is comment out the 2.10 version, then have some tool that runs through and transforms the code uncommenting the 2.10 code and commenting out the 2.9 code, or vice versa. I'll probably have to do that for macros, but I'd rather it be limited to macro usage.

Bill
 

-jason
Eugene Burmako | 16 Jun 2012 01:37
Picon
Picon
Favicon
Gravatar

Re: 2.10.0.M4 build problem

The problem with the deprecation messages is that I've deprecated both class Manifest and object Manifest. The former is used in context bounds, calls to the latter are generated by the compiler when materializing tags.

Most likely we will drop the <at> deprecated annotation on the latter, but first I'd like to explore some better options.

Is that the only problem you have with manifests and tags in ScalaTest?

On 16 June 2012 01:23, Bill Venners <bill <at> artima.com> wrote:
Hi Jason,

On Friday, June 15, 2012 2:07:21 PM UTC-7, Jason Zaugg wrote:
On Fri, Jun 15, 2012 at 9:39 PM, Bill Venners <bill <at> artima.com> wrote:
> I've made a small example that shows the compilation error I'm experiencing
> in M4. This small example compiles and runs fine under 2.9.1 and 2.10.0-M3.
> But it doesn't compile under 2.10.0-M4. I'll make a ticket for this shortly,
> but I thought I'd post it here as well. Here's the code:
>
> object M4Prob extends App {
>
>   abstract class LengthWrapper {
>     def length: Long
>   }
>
>   implicit def convertGetLengthFieldToLongLengthWrapper(o: { val getLength:
> Long }): LengthWrapper =
>     new LengthWrapper {
>       def length = o.getLength
>     }
>
>   implicit def convertHasLongGetLengthFieldToLengthShouldWrapper[T <: AnyRef
> { val getLength: Long}](o: T): LengthShouldWrapper[T] = new
> LengthShouldWrapper[T](o)
>
>   final class LengthShouldWrapper[A <: AnyRef <% LengthWrapper](left: A) {
>
>     def should(o: Any) {
>       println("Length was: " + left.length)
>     }
>   }
>
>   class Lengthy {
>     def getLength: Long = 99L
>   }
>
>   (new Lengthy) should "howdy"
> }
>
> Under 2.9.1 and 2.10.0-M3, it compiles and when you run it, it correctly
> prints:
>
> Length was: 99
>
> Under 2.10.0-M3, it fails to compile with this error message:
>
> M4Prob.scala:26: error: value should is not a member of M4Prob.Lengthy
>   (new Lengthy) should "howdy"
>                 ^
> one error found

AFAICT, you were relying on a bug. I'm not sure exactly when this
changed. Trimming the problem down little:

object M4Prob extends App {
  trait Lengthy {
    def getLength: Any
  }

  val l: Lengthy = null

  l: {val getLength: Any} // error here is correct: def is not a subtype of val
  l: {def getLength: Any} // okay
}

Oh, well if so that's actually just a bug in my short example. In ScalaTest there's an implicit conversion on both:

 /**
   * This implicit conversion method converts an object with a <code>getLength</code> field of type <code>Int</code> to a
   * <code>LengthWrapper</code>, to enable that object to be used with the <code>have length (7)</code> syntax.
   */
  implicit def convertGetLengthFieldToIntLengthWrapper(o: { val getLength: Int }): LengthWrapper =
    new LengthWrapper {
      def length: Long = o.getLength
    }

  /**
   * This implicit conversion method converts an object with a <code>getLength</code> method of type <code>Int</code> to a
   * <code>LengthWrapper</code>, to enable that object to be used with the <code>have length (7)</code> syntax.
   */
  implicit def convertGetLengthMethodToIntLengthWrapper(o: { def getLength(): Int }): LengthWrapper =
    new LengthWrapper {
      def length: Long = o.getLength()
    }

 
> One other problem with M4, which I imagine has been reported and may even be
> fixed by now, is that M4 is giving a deprecation warning at the use sites of
> Manifest instead of just the declaration sites. ScalaTest is using Manifest
> for its intercept method, for example, and yes when I compile ScalaTest I
> should get a deprecation warning where intercept is defined in trait
> Assertions. But what's happening is that ScalaTest users are getting a
> deprecation warning about Manifest everywhere they invoke intercept (and
> several other methods). I got so many such warnings when compiling
> ScalaTest's own tests had to turn off deprecation warnings to see what the
> errors were. Anyway, if I can't find a ticket for that one I'll submit one.

The migration path from manifests to class tags does need some smoothing,
but I suggest you would be best served to change your 2.10.x branch to heed
the warnings and switch away from manifests. Maybe Eugene can comment with
specific advice on what to change here.

It is really not practical for me to have a different branch after 2.10 is released final, because I want to support 2.8 and 2.9 as well. I'll drop 2.8 support after ScalaTest 2.0 probably, but I expect I'll support 2.9 for a long time to come. A lot of business users don't upgrade (for example, Twitter) right away after a new major Scala release comes out. The best I could do is comment out the 2.10 version, then have some tool that runs through and transforms the code uncommenting the 2.10 code and commenting out the 2.9 code, or vice versa. I'll probably have to do that for macros, but I'd rather it be limited to macro usage.

Bill
 

-jason

Bill Venners | 17 Jun 2012 03:36
Favicon

Re: 2.10.0.M4 build problem

Hi Eugene,

On Friday, June 15, 2012 4:37:41 PM UTC-7, Eugene Burmako wrote:

The problem with the deprecation messages is that I've deprecated both class Manifest and object Manifest. The former is used in context bounds, calls to the latter are generated by the compiler when materializing tags.

Most likely we will drop the <at> deprecated annotation on the latter, but first I'd like to explore some better options.

Is that the only problem you have with manifests and tags in ScalaTest?

Sorry for the delay in responding. The answer is yes. Everything with manifests and tags works just fine, as far as I can tell. The only problem is the over-enthusiastic deprecation warnings.

Thanks.

Bill
 
On 16 June 2012 01:23, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
Hi Jason,

On Friday, June 15, 2012 2:07:21 PM UTC-7, Jason Zaugg wrote:
On Fri, Jun 15, 2012 at 9:39 PM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
> I've made a small example that shows the compilation error I'm experiencing
> in M4. This small example compiles and runs fine under 2.9.1 and 2.10.0-M3.
> But it doesn't compile under 2.10.0-M4. I'll make a ticket for this shortly,
> but I thought I'd post it here as well. Here's the code:
>
> object M4Prob extends App {
>
>   abstract class LengthWrapper {
>     def length: Long
>   }
>
>   implicit def convertGetLengthFieldToLongLengthWrapper(o: { val getLength:
> Long }): LengthWrapper =
>     new LengthWrapper {
>       def length = o.getLength
>     }
>
>   implicit def convertHasLongGetLengthFieldToLengthShouldWrapper[T <: AnyRef
> { val getLength: Long}](o: T): LengthShouldWrapper[T] = new
> LengthShouldWrapper[T](o)
>
>   final class LengthShouldWrapper[A <: AnyRef <% LengthWrapper](left: A) {
>
>     def should(o: Any) {
>       println("Length was: " + left.length)
>     }
>   }
>
>   class Lengthy {
>     def getLength: Long = 99L
>   }
>
>   (new Lengthy) should "howdy"
> }
>
> Under 2.9.1 and 2.10.0-M3, it compiles and when you run it, it correctly
> prints:
>
> Length was: 99
>
> Under 2.10.0-M3, it fails to compile with this error message:
>
> M4Prob.scala:26: error: value should is not a member of M4Prob.Lengthy
>   (new Lengthy) should "howdy"
>                 ^
> one error found

AFAICT, you were relying on a bug. I'm not sure exactly when this
changed. Trimming the problem down little:

object M4Prob extends App {
  trait Lengthy {
    def getLength: Any
  }

  val l: Lengthy = null

  l: {val getLength: Any} // error here is correct: def is not a subtype of val
  l: {def getLength: Any} // okay
}

Oh, well if so that's actually just a bug in my short example. In ScalaTest there's an implicit conversion on both:

 /**
   * This implicit conversion method converts an object with a <code>getLength</code> field of type <code>Int</code> to a
   * <code>LengthWrapper</code>, to enable that object to be used with the <code>have length (7)</code> syntax.
   */
  implicit def convertGetLengthFieldToIntLengthWrapper(o: { val getLength: Int }): LengthWrapper =
    new LengthWrapper {
      def length: Long = o.getLength
    }

  /**
   * This implicit conversion method converts an object with a <code>getLength</code> method of type <code>Int</code> to a
   * <code>LengthWrapper</code>, to enable that object to be used with the <code>have length (7)</code> syntax.
   */
  implicit def convertGetLengthMethodToIntLengthWrapper(o: { def getLength(): Int }): LengthWrapper =
    new LengthWrapper {
      def length: Long = o.getLength()
    }

 
> One other problem with M4, which I imagine has been reported and may even be
> fixed by now, is that M4 is giving a deprecation warning at the use sites of
> Manifest instead of just the declaration sites. ScalaTest is using Manifest
> for its intercept method, for example, and yes when I compile ScalaTest I
> should get a deprecation warning where intercept is defined in trait
> Assertions. But what's happening is that ScalaTest users are getting a
> deprecation warning about Manifest everywhere they invoke intercept (and
> several other methods). I got so many such warnings when compiling
> ScalaTest's own tests had to turn off deprecation warnings to see what the
> errors were. Anyway, if I can't find a ticket for that one I'll submit one.

The migration path from manifests to class tags does need some smoothing,
but I suggest you would be best served to change your 2.10.x branch to heed
the warnings and switch away from manifests. Maybe Eugene can comment with
specific advice on what to change here.

It is really not practical for me to have a different branch after 2.10 is released final, because I want to support 2.8 and 2.9 as well. I'll drop 2.8 support after ScalaTest 2.0 probably, but I expect I'll support 2.9 for a long time to come. A lot of business users don't upgrade (for example, Twitter) right away after a new major Scala release comes out. The best I could do is comment out the 2.10 version, then have some tool that runs through and transforms the code uncommenting the 2.10 code and commenting out the 2.9 code, or vice versa. I'll probably have to do that for macros, but I'd rather it be limited to macro usage.

Bill
 

-jason

Jason Zaugg | 16 Jun 2012 02:11
Picon
Gravatar

Re: 2.10.0.M4 build problem

On Sat, Jun 16, 2012 at 1:23 AM, Bill Venners <bill@...> wrote:
> On Friday, June 15, 2012 2:07:21 PM UTC-7, Jason Zaugg wrote:
> Oh, well if so that's actually just a bug in my short example. In ScalaTest
> there's an implicit conversion on both:
>
>  /**
>    * This implicit conversion method converts an object with a
> <code>getLength</code> field of type <code>Int</code> to a
>    * <code>LengthWrapper</code>, to enable that object to be used with the
> <code>have length (7)</code> syntax.
>    */
>   implicit def convertGetLengthFieldToIntLengthWrapper(o: { val getLength:
> Int }): LengthWrapper =
>     new LengthWrapper {
>       def length: Long = o.getLength
>     }
>
>   /**
>    * This implicit conversion method converts an object with a
> <code>getLength</code> method of type <code>Int</code> to a
>    * <code>LengthWrapper</code>, to enable that object to be used with the
> <code>have length (7)</code> syntax.
>    */
>   implicit def convertGetLengthMethodToIntLengthWrapper(o: { def
> getLength(): Int }): LengthWrapper =
>     new LengthWrapper {
>       def length: Long = o.getLength()
>     }

The empty parameter section is significant, for the difficult reasons
discussed in https://issues.scala-lang.org/browse/SI-4506.

You should provide conversions for:

  { def getLength(): Int } and { def getLength: Int }.

The latter will catch vals, so you can replace that one; and this change will
work perfectly well in Scala 2.9.x.

>> The migration path from manifests to class tags does need some smoothing,
>> but I suggest you would be best served to change your 2.10.x branch to
>> heed
>> the warnings and switch away from manifests. Maybe Eugene can comment with
>> specific advice on what to change here.
>>
> It is really not practical for me to have a different branch after 2.10 is
> released final, because I want to support 2.8 and 2.9 as well. I'll drop 2.8
> support after ScalaTest 2.0 probably, but I expect I'll support 2.9 for a
> long time to come. A lot of business users don't upgrade (for example,
> Twitter) right away after a new major Scala release comes out. The best I
> could do is comment out the 2.10 version, then have some tool that runs
> through and transforms the code uncommenting the 2.10 code and commenting
> out the 2.9 code, or vice versa. I'll probably have to do that for macros,
> but I'd rather it be limited to macro usage.

You might be able to isolate the differences to a single file, and conditionally
include a suitable version in your build. It could contain a few type aliases
and methods to abstract over the differences between 2.9.x and 2.10.x.
Or perhaps
Eugene will soften the deprecation stance, and you can defer the problem until
2.11.x.

-jason

Bill Venners | 17 Jun 2012 03:44
Favicon

Re: 2.10.0.M4 build problem

Hi Jason,

On Friday, June 15, 2012 5:11:37 PM UTC-7, Jason Zaugg wrote:

On Sat, Jun 16, 2012 at 1:23 AM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
> On Friday, June 15, 2012 2:07:21 PM UTC-7, Jason Zaugg wrote:
> Oh, well if so that's actually just a bug in my short example. In ScalaTest
> there's an implicit conversion on both:
>
>  /**
>    * This implicit conversion method converts an object with a
> <code>getLength</code> field of type <code>Int</code> to a
>    * <code>LengthWrapper</code>, to enable that object to be used with the
> <code>have length (7)</code> syntax.
>    */
>   implicit def convertGetLengthFieldToIntLengthWrapper(o: { val getLength:
> Int }): LengthWrapper =
>     new LengthWrapper {
>       def length: Long = o.getLength
>     }
>
>   /**
>    * This implicit conversion method converts an object with a
> <code>getLength</code> method of type <code>Int</code> to a
>    * <code>LengthWrapper</code>, to enable that object to be used with the
> <code>have length (7)</code> syntax.
>    */
>   implicit def convertGetLengthMethodToIntLengthWrapper(o: { def
> getLength(): Int }): LengthWrapper =
>     new LengthWrapper {
>       def length: Long = o.getLength()
>     }

The empty parameter section is significant, for the difficult reasons
discussed in https://issues.scala-lang.org/browse/SI-4506.

You should provide conversions for:

  { def getLength(): Int } and { def getLength: Int }.

The latter will catch vals, so you can replace that one; and this change will
work perfectly well in Scala 2.9.x.

OK. That's good to know. Before I read your post I just added an extra implicit conversion for the parameterless method and left the val ones in. I will check later if I can remove the val ones and have it still work in 2.8. and 2.9. I still want to support 2.8 one more time with the 2.0 release before I move on. Anyway, adding the extra implicit conversions solved the problem. I released a new build, this time with a stable identifier (requested by Viktor):

https://oss.sonatype.org/content/groups/public/org/scalatest/scalatest_2.10.0-M4/1.9-2.10.0-M4-B1/

I checked in the changes for this new build into the same branch, which is here:

https://scalatest.googlecode.com/svn/branches/r18for210M4

I still get the blow up problem when I try to run the tests:

runtest:
[scalatest] Jun 16 18:42:15 Mi-Novia.local java[2606] <Error>: CGContextGetCTM: invalid context 0x0
[scalatest] Jun 16 18:42:15 Mi-Novia.local java[2606] <Error>: CGContextSetBaseCTM: invalid context 0x0
[scalatest] Jun 16 18:42:15 Mi-Novia.local java[2606] <Error>: CGContextGetCTM: invalid context 0x0
[scalatest] Jun 16 18:42:15 Mi-Novia.local java[2606] <Error>: CGContextSetBaseCTM: invalid context 0x0
[scalatest] Jun 16 18:42:15 Mi-Novia.local java[2606] <Error>: CGContextGetCTM: invalid context 0x0
[scalatest] Jun 16 18:42:15 Mi-Novia.local java[2606] <Error>: CGContextSetBaseCTM: invalid context 0x0
[scalatest] *** RUN ABORTED *** (17 seconds, 655 milliseconds)
[scalatest]   java.lang.VerifyError: (class: org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature: (Lorg/scalatest/BeforeAndAfterEachFunctions;Ljava/lang/String;Lorg/scalatest/Reporter;Lorg/scalatest/Stopper;Lscala/collection/immutable/Map;Lorg/scalatest/Tracker;)V) Register 16 contains wrong type
[scalatest]   at org.scalatest.BeforeAndAfterFunctionsExtendingSuite.<init>(BeforeAndAfterFunctionsSuite.scala:415)
[scalatest]   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[scalatest]   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[scalatest]   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[scalatest]   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[scalatest]   at java.lang.Class.newInstance0(Class.java:355)
[scalatest]   at java.lang.Class.newInstance(Class.java:308)
[scalatest]   at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:40)
[scalatest]   at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:34)
[scalatest]   at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:239)
[scalatest]   ...

I still didn't have a M4 build of ScalaCheck to compile against. Once Rickard get's one out I'll try again.

Thanks for all your help.

Bill
 
>> The migration path from manifests to class tags does need some smoothing,
>> but I suggest you would be best served to change your 2.10.x branch to
>> heed
>> the warnings and switch away from manifests. Maybe Eugene can comment with
>> specific advice on what to change here.
>>
> It is really not practical for me to have a different branch after 2.10 is
> released final, because I want to support 2.8 and 2.9 as well. I'll drop 2.8
> support after ScalaTest 2.0 probably, but I expect I'll support 2.9 for a
> long time to come. A lot of business users don't upgrade (for example,
> Twitter) right away after a new major Scala release comes out. The best I
> could do is comment out the 2.10 version, then have some tool that runs
> through and transforms the code uncommenting the 2.10 code and commenting
> out the 2.9 code, or vice versa. I'll probably have to do that for macros,
> but I'd rather it be limited to macro usage.

You might be able to isolate the differences to a single file, and conditionally
include a suitable version in your build. It could contain a few type aliases
and methods to abstract over the differences between 2.9.x and 2.10.x.
Or perhaps
Eugene will soften the deprecation stance, and you can defer the problem until
2.11.x.

-jason
Paul Phillips | 17 Jun 2012 04:55

Re: 2.10.0.M4 build problem


On Sat, Jun 16, 2012 at 6:44 PM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
>
> I still didn't have a M4 build of ScalaCheck to compile against. Once Rickard get's one out I'll try again.

As already pointed out in the ticket, this isn't going to make any difference.  As also pointed out in the ticket, what is likely to make a difference is compiling with -Xoldpatmat.  It's possible you'll run into some different bug, but it is unlikely you'll run into SI-5929.

Jason Zaugg | 17 Jun 2012 10:04
Picon
Gravatar

Re: 2.10.0.M4 build problem

On Sun, Jun 17, 2012 at 3:44 AM, Bill Venners <bill@...> wrote:
> I still get the blow up problem when I try to run the tests:
> [scalatest]   java.lang.VerifyError: (class:
> org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature:
> (Lorg/scalatest/BeforeAndAfterEachFunctions;Ljava/lang/String;Lorg/scalatest/Reporter;Lorg/scalatest/Stopper;Lscala/collection/immutable/Map;Lorg/scalatest/Tracker;)V)
> Register 16 contains wrong type

Here's a patch to workaround the problem.

   https://gist.github.com/2943865

-jason

Bill Venners | 17 Jun 2012 15:35
Favicon

Re: 2.10.0.M4 build problem

Hi Jason and Paul,


Thanks for chasing it down. I've got a flight today. Will deploy a new build after I get in.

Bill

On Sunday, June 17, 2012 1:04:00 AM UTC-7, Jason Zaugg wrote:
On Sun, Jun 17, 2012 at 3:44 AM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
> I still get the blow up problem when I try to run the tests:
> [scalatest]   java.lang.VerifyError: (class:
> org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature:
> (Lorg/scalatest/BeforeAndAfterEachFunctions;Ljava/lang/String;Lorg/scalatest/Reporter;Lorg/scalatest/Stopper;Lscala/collection/immutable/Map;Lorg/scalatest/Tracker;)V)
> Register 16 contains wrong type

Here's a patch to workaround the problem.

   https://gist.github.com/2943865

-jason
Bill Venners | 18 Jun 2012 06:25
Favicon

Re: 2.10.0.M4 build problem

Hi y'All,


Sorry to be such a bother with this M4 build, but I unfortunately hit another snag on the plane. Rickard deployed an M4 build of ScalaCheck which ScalaTest is choking on. You don't need ScalaTest to reproduce it, just ScalaCheck. Here's an interpreter session with M3:

Mi-Novia:scalacheckprob bv$ /usr/artima/scala-2.10.0-M3/bin/scala -cp scalacheck_2.10.0-M3-1.10-SNAPSHOT.jar 
Welcome to Scala version 2.10.0-M3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_33).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import org.scalacheck.Prop
import org.scalacheck.Prop

scala> import org.scalacheck.Arg
import org.scalacheck.Arg

scala> def getArgsWithSpecifiedNames(argNames: Option[List[String]], scalaCheckArgs: Prop.Args): List[Arg[Any]] = {
     |     if (argNames.isDefined) {
     |       // length of scalaCheckArgs should equal length of argNames
     |       val zipped = argNames.get zip scalaCheckArgs
     |       zipped map { case (argName, arg) => arg.copy(label = argName) }
     |     }
     |     else
     |       scalaCheckArgs
     |   }
getArgsWithSpecifiedNames: (argNames: Option[List[String]], scalaCheckArgs: org.scalacheck.Prop.Args)List[org.scalacheck.Arg[Any]]


And here's the same interpreter session with M4:

$ /usr/artima/scala-2.10.0-M4/bin/scala -cp scalacheck_2.10.0-M4-1.8.jar 
Welcome to Scala version 2.10.0-M4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_33).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import org.scalacheck.Prop
import org.scalacheck.Prop

scala> import org.scalacheck.Arg
import org.scalacheck.Arg

scala> def getArgsWithSpecifiedNames(argNames: Option[List[String]], scalaCheckArgs: Prop.Args): List[Arg[Any]] = {
     |     if (argNames.isDefined) {
     |       // length of scalaCheckArgs should equal length of argNames
     |       val zipped = argNames.get zip scalaCheckArgs
     |       zipped map { case (argName, arg) => arg.copy(label = argName) }
     |     }
     |     else
     |       scalaCheckArgs
     |   }
<console>:13: error: type mismatch;
 found   : List[(Any => org.scalacheck.Pretty) => org.scalacheck.Arg[Any]]
 required: List[org.scalacheck.Arg[Any]]
             zipped map { case (argName, arg) => arg.copy(label = argName) }
                    ^

A quite different result. Just for the heck of it I also tried Scala 2.10.0-M4 with the ScalaCheck build against 2.10.0-M3, got the same weirdness:

$ /usr/artima/scala-2.10.0-M4/bin/scala -cp scalacheck_2.10.0-M3-1.10-SNAPSHOT.jar 
Welcome to Scala version 2.10.0-M4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_33).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import org.scalacheck.Prop
import org.scalacheck.Prop

scala> import org.scalacheck.Args
<console>:8: error: object Args is not a member of package org.scalacheck
       import org.scalacheck.Args
              ^

scala> import org.scalacheck.Arg
import org.scalacheck.Arg

scala> def getArgsWithSpecifiedNames(argNames: Option[List[String]], scalaCheckArgs: Prop.Args): List[Arg[Any]] = {
     |     if (argNames.isDefined) {
     |       // length of scalaCheckArgs should equal length of argNames
     |       val zipped = argNames.get zip scalaCheckArgs
     |       zipped map { case (argName, arg) => arg.copy(label = argName) }
     |     }
     |     else
     |       scalaCheckArgs
     |   }
<console>:13: error: type mismatch;
 found   : List[(Any => org.scalacheck.Pretty) => org.scalacheck.Arg[Any]]
 required: List[org.scalacheck.Arg[Any]]
             zipped map { case (argName, arg) => arg.copy(label = argName) }
                    ^

So it looks like a feature of M4. Any clues?

To make it easier to try out, here's code you can just paste into the interpreter to reproduce:

import org.scalacheck.Prop
import org.scalacheck.Arg

def getArgsWithSpecifiedNames(argNames: Option[List[String]], scalaCheckArgs: Prop.Args): List[Arg[Any]] = { 
  if (argNames.isDefined) {
    // length of scalaCheckArgs should equal length of argNames
     val zipped = argNames.get zip scalaCheckArgs
     zipped map { case (argName, arg) => arg.copy(label = argName) }
  }
  else
    scalaCheckArgs
}

Thanks.

Bill

On Sunday, June 17, 2012 6:35:15 AM UTC-7, Bill Venners wrote:
Hi Jason and Paul,

Thanks for chasing it down. I've got a flight today. Will deploy a new build after I get in.

Bill

On Sunday, June 17, 2012 1:04:00 AM UTC-7, Jason Zaugg wrote:
On Sun, Jun 17, 2012 at 3:44 AM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
> I still get the blow up problem when I try to run the tests:
> [scalatest]   java.lang.VerifyError: (class:
> org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature:
> (Lorg/scalatest/BeforeAndAfterEachFunctions;Ljava/lang/String;Lorg/scalatest/Reporter;Lorg/scalatest/Stopper;Lscala/collection/immutable/Map;Lorg/scalatest/Tracker;)V)
> Register 16 contains wrong type

Here's a patch to workaround the problem.

   https://gist.github.com/2943865

-jason
Paul Phillips | 18 Jun 2012 06:52

Re: 2.10.0.M4 build problem


On Sun, Jun 17, 2012 at 9:25 PM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
So it looks like a feature of M4. Any clues?

A guy might start to wonder why he bothers.


That's this same thread.  The second time in less than a day; such a hint, I can take.

Bill Venners | 18 Jun 2012 15:25
Favicon

Re: 2.10.0.M4 build problem

Hi Paul,


Sorry, I did read your post, but by the time I hit the problem myself that memory had disappear in a mist.

Bill

On Sunday, June 17, 2012 9:52:11 PM UTC-7, Paul Phillips wrote:

On Sun, Jun 17, 2012 at 9:25 PM, Bill Venners <bill-7L19218AtADQT0dZR+AlfA@public.gmane.org> wrote:
So it looks like a feature of M4. Any clues?

A guy might start to wonder why he bothers.


That's this same thread.  The second time in less than a day; such a hint, I can take.

Eugene Burmako | 16 Jun 2012 00:53
Picon
Picon
Favicon
Gravatar

Re: 2.10.0.M4 build problem

Yes, please, submit a ticket about extraneous warnings. I think, we
might end up removing the deprecation from Manifest the object.

On Jun 15, 9:39 pm, Bill Venners <b...@...> wrote:
> Hi All,
>
> I've made a small example that shows the compilation error I'm experiencing
> in M4. This small example compiles and runs fine under 2.9.1 and 2.10.0-M3.
> But it doesn't compile under 2.10.0-M4. I'll make a ticket for this
> shortly, but I thought I'd post it here as well. Here's the code:
>
> object M4Prob extends App {
>
>   abstract class LengthWrapper {
>     def length: Long
>   }
>
>   implicit def convertGetLengthFieldToLongLengthWrapper(o: { val getLength:
> Long }): LengthWrapper =
>     new LengthWrapper {
>       def length = o.getLength
>     }
>
>   implicit def convertHasLongGetLengthFieldToLengthShouldWrapper[T <:
> AnyRef { val getLength: Long}](o: T): LengthShouldWrapper[T] = new
> LengthShouldWrapper[T](o)
>
>   final class LengthShouldWrapper[A <: AnyRef <% LengthWrapper](left: A) {
>
>     def should(o: Any) {
>       println("Length was: " + left.length)
>     }
>   }
>
>   class Lengthy {
>     def getLength: Long = 99L
>   }
>
>   (new Lengthy) should "howdy"
>
> }
>
> Under 2.9.1 and 2.10.0-M3, it compiles and when you run it, it correctly
> prints:
>
> Length was: 99
>
> Under 2.10.0-M3, it fails to compile with this error message:
>
> M4Prob.scala:26: error: value should is not a member of M4Prob.Lengthy
>   (new Lengthy) should "howdy"
>                 ^
> one error found
>
> One other problem with M4, which I imagine has been reported and may even
> be fixed by now, is that M4 is giving a deprecation warning at the use
> sites of Manifest instead of just the declaration sites. ScalaTest is using
> Manifest for its intercept method, for example, and yes when I compile
> ScalaTest I should get a deprecation warning where intercept is defined in
> trait Assertions. But what's happening is that ScalaTest users are getting
> a deprecation warning about Manifest everywhere they invoke intercept (and
> several other methods). I got so many such warnings when compiling
> ScalaTest's own tests had to turn off deprecation warnings to see what the
> errors were. Anyway, if I can't find a ticket for that one I'll submit one.
>
> Lastly, I still have the runtime error that prevents me from running
> ScalaTest's tests of itself under M4. I will post a ticket about that one
> too, but if anyone has any ideas from the error message I'd appreciate a
> tip. Here's what that looks like:
>
> runtest:
> [scalatest] *** RUN ABORTED *** (21 seconds, 76 milliseconds)
> [scalatest]   java.lang.VerifyError: (class:
> org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature:
> (Lorg/scalatest/BeforeAndAfterEachFunctions;Ljava/lang/String;Lorg/scalates­t/Reporter;Lorg/scalatest/Stopper;Lscala/collection/immutable/Map;Lorg/scal­atest/Tracker;)V)
> Register 16 contains wrong type
> [scalatest]   at
> org.scalatest.BeforeAndAfterFunctionsExtendingSuite.<init>(BeforeAndAfterFu­nctionsSuite.scala:415)
> [scalatest]   at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> [scalatest]   at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce­ssorImpl.java:39)
> [scalatest]   at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru­ctorAccessorImpl.java:27)
> [scalatest]   at
> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> [scalatest]   at java.lang.Class.newInstance0(Class.java:355)
> [scalatest]   at java.lang.Class.newInstance(Class.java:308)
> [scalatest]   at
> org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:40­)
> [scalatest]   at
> org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:34­)
> [scalatest]   at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala­:239)
> [scalatest]   ...
>
> If anyone can point me in the right direction for this one I'd appreciate
> it. And, if you want to see it for yourself, check out this branch:
>
> https://scalatest.googlecode.com/svn/branches/r18for210M4
>
> And type:
>
> ant compile; ant gencode; ant test
>
> I was able to deploy a 1.8-SNAPSHOT of ScalaTest under 2.10.0-M4, by
> commenting out the tests that were hitting the length/size structural type
> implicit conversion compile problem. That allowed me to compile. The tests
> didn't run, but I deployed anyway, and at least two users have reported it
> is working for them. Viktor can't get Akka's tests to compile, though, and
> suspects ScalaTest's M4 build could be the source of the problem. Best way
> to find out is to solve the compilation and test running problems so I can
> deploy a clean build.
>
> Thanks.
>
> Bill
>
>
>
>
>
>
>
> On Wednesday, June 13, 2012 4:06:45 PM UTC-7, Bill Venners wrote:
>
> > Hi All,
>
> > By the way I also get a problem when I try to run the tests. I think I got
> > something like this on M3 and never had time to investigate. I finally
> > should have the time soon, but in case it helps, this is the exception:
>
> > runtest:
> > [scalatest] *** RUN ABORTED *** (21 seconds, 76 milliseconds)
> > [scalatest]   java.lang.VerifyError: (class:
> > org/scalatest/BeforeAndAfterEachFunctions$class, method: runTest signature:
> > (Lorg/scalatest/BeforeAndAfterEachFunctions;Ljava/lang/String;Lorg/scalates­t/Reporter;Lorg/scalatest/Stopper;Lscala/collection/immutable/Map;Lorg/scal­atest/Tracker;)V)
> > Register 16 contains wrong type
> > [scalatest]   at
> > org.scalatest.BeforeAndAfterFunctionsExtendingSuite.<init>(BeforeAndAfterFu­nctionsSuite.scala:415)
> > [scalatest]   at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> > [scalatest]   at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce­ssorImpl.java:39)
> > [scalatest]   at
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru­ctorAccessorImpl.java:27)
> > [scalatest]   at
> > java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> > [scalatest]   at java.lang.Class.newInstance0(Class.java:355)
> > [scalatest]   at java.lang.Class.newInstance(Class.java:308)
> > [scalatest]   at
> > org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:40­)
> > [scalatest]   at
> > org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:34­)
> > [scalatest]   at
> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala­:239)
> > [scalatest]   ...
>
> > If anyone can point me in the right direction for this one I'd appreciate
> > it. And, if you want to see it for yourself, check out this branch:
>
> >https://scalatest.googlecode.com/svn/branches/r18for210M4
>
> > And type:
>
> > ant compile; ant gencode; ant test
>
> > Thanks.
>
> > Bill
>
> > On Wednesday, June 13, 2012 6:42:39 PM UTC-4, Bill Venners wrote:
>
> >> Hi Viktor,
>
> >> To be precise it will break client code that was using those implicits
> >> prior to the scalatest_2.10.0-M4 release. I'll have more time to
> >> investigate tomorrow on the plane. If it looks like a bug to the powers
> >> that be, you can reproduce it by checking out this branch and doing an "ant
> >> compile":
>
> >>https://scalatest.googlecode.com/svn/branches/structImplM4Prob
>
> >> (Sorry haven't had time to finish our sbt build.)
>
> >> Bill
>
> >> On Wednesday, June 13, 2012 6:36:30 PM UTC-4, Bill Venners wrote:
>
> >>> Hi Viktor,
>
> >>> Working on it. Something changed in M4 related to implicit conversions
> >>> on structural types. Not sure if it was intentional. Only breaks
> >>> ScalaTests's tests of itself, so I'll be deploying probably after dinner
> >>> tonight.
>
> >>> Bill
>
> >>> On Wednesday, June 13, 2012 2:27:17 PM UTC-4, √iktor Klang wrote:
>
> >>>> On Wed, Jun 13, 2012 at 8:19 PM, Bill Venners <b...@...> wrote:
>
> >>>>> Hi Eugene,
>
> >>>>> Thanks for the tip!
>
> >>>> Looking forward to a published version of ScalaTest for 2.10.0-M4 Bill
> >>>> :-)
>
> >>>>> Bill
>
> >>>>> On Wednesday, June 13, 2012 12:49:11 PM UTC-4, Eugene Burmako wrote:
>
> >>>>>> Hey, you need to add scala-reflect.jar to the classpath of the
> >>>>>> compiler.
>
> >>>>>> On Jun 13, 2012 6:45 PM, "Bill Venners" <b...@...> wrote:
>
> >>>>>>> Hi All,
>
> >>>>>>> I'm trying to build ScalaTest under 2.10.0.M4, and I get this error:
>
> >>>>>>> BUILD FAILED
> >>>>>>> /Users/bv/nobkp/delus/**r18for210M3/build.xml:115: The following
> >>>>>>> error
> >>>>>>> occurred while executing this line:
> >>>>>>> jar:file:/Users/bv/.m2/**repository/org/scala-lang/**
> >>>>>>> scala-compiler/2.10.0-M4/**scala-compiler-2.10.0-M4.jar!/**
> >>>>>>> scala/tools/ant/antlib.xml:5:
> >>>>>>> taskdef A class needed by class scala.tools.ant.FastScalac cannot be
> >>>>>>> found: scala/reflect/internal/**settings/AbsSettings
>
> >>>>>>> Can anyone shed light on this?
>
> >>>>>>> In case you want to investigate, the branch I'm trying to build is
> >>>>>>> here:
>
> >>>>>>>https://scalatest.googlecode.**com/svn/branches/r18for210M4<https://scalatest.googlecode.com/svn/branches/r18for210M4>
>
> >>>>>>> Just need to say "ant compile". This compiled fine under M3.
>
> >>>>>>> Thanks.
>
> >>>>>>> Bill
> >>>>>>> ----
> >>>>>>> Bill Venners
> >>>>>>> Artima, Inc.
> >>>>>>>http://www.artima.com
>
> >>>> --
> >>>> Viktor Klang
>
> >>>> Akka Tech Lead
> >>>> Typesafe <http://www.typesafe.com/> - The software stack for
> >>>> applications that scale
>
> >>>> Twitter:  <at> viktorklang


Gmane