|
Re: Scalatest 1.6.1 has some classes compiled with JDK1.6
|
Posted: Jul 6, 2011 9:09 AM
|
|
Hi Jarek, > > For example TagAnnotation.class in scalatest-1.6.1 has > major version:50. > > It seems that you had similiar accidental problems in > previous releases, so could you please create an official > 1.6.1 distribution that is usable with JDK 1.5? > You are correct, and sorry for the trouble. We had mistakenly assumed that telling Scala to target jvm15 would actually solve the problem. What that does though is just tell it to generate 1.5 bytecodes. It still actually looks at the 1.6 library. So for example it tries to call isEmpty on java.lang.String, which was introduced in JDK 1.6, instead of using the implicit conversion. The TagAnnotation hadn't been brought to my attention before, and that's a different problem, which is that is compiled with javac not scalac.
The only way to target 1.5, therefore, is to build on 1.5. That's it. So we have added into our build something that will kill the build if it notices it is not building under JDK 1.5. That should prevent any further problems like this.
I did release a 1.6.2 snapshot a while back that is 1.6.1 built on top of JDK 1.5:
http://www.scala-tools.org/repo-snapshots/org/scalatest/scalatest_2.9.0/1.6.2-SNAPSHOT/
Can you use this snapshot for a while? If not I'll do a new real release, but I'd rather wait until I have some new features for 1.6.2 as well.
|
|