The Artima Developer Community
Sponsored Link

ScalaTest/ScalaUtils Forum
Scalatest 1.6.1 has some classes compiled with JDK1.6

4 replies on 1 page. Most recent reply: Feb 20, 2012 10:28 AM by Bill Venners

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 4 replies on 1 page
Jarek Wosik

Posts: 3
Nickname: wosik
Registered: Jul, 2011

Scalatest 1.6.1 has some classes compiled with JDK1.6 Posted: Jul 6, 2011 9:25 AM
Reply to this message Reply
Advertisement
Hi,

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?

Regards,
Jarek Wosik.


Bill Venners

Posts: 2249
Nickname: bv
Registered: Jan, 2002

Re: Scalatest 1.6.1 has some classes compiled with JDK1.6 Posted: Jul 6, 2011 12:09 PM
Reply to this message Reply
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.

Jarek Wosik

Posts: 3
Nickname: wosik
Registered: Jul, 2011

Re: Scalatest 1.6.1 has some classes compiled with JDK1.6 Posted: Jul 6, 2011 12:28 PM
Reply to this message Reply
Hi,
Yes I am perfectly fine with using 1.6.2-SNAPSHOT and indeed it solved my JDK1.5 problem.
Thank you for the solution and quick reply.

Regards,
Jarek Wosik.

Jarek Wosik

Posts: 3
Nickname: wosik
Registered: Jul, 2011

Re: Scalatest 1.6.1 has some classes compiled with JDK1.6 Posted: Feb 19, 2012 4:23 PM
Reply to this message Reply
Hello again,
It seems that 1.7.1 has exactly the same issue - TagAnnotation is compiled with Java 1.6: CAFEBABE00000032
So I'll stick with prev version for my Java 1.5 projects.

Anyway I think that Scalatest is great tool.
Regards,
Jarek Wosik.

Bill Venners

Posts: 2249
Nickname: bv
Registered: Jan, 2002

Re: Scalatest 1.6.1 has some classes compiled with JDK1.6 Posted: Feb 20, 2012 10:28 AM
Reply to this message Reply
> Hello again,
> It seems that 1.7.1 has exactly the same issue -
> TagAnnotation is compiled with Java 1.6: CAFEBABE00000032
> So I'll stick with prev version for my Java 1.5 projects.
>
> Anyway I think that Scalatest is great tool.
> Regards,
>
>
That's very frustrating. That is compiled with javac, not scalac, and we tell ant to use javac1.5. It shouldn't be this hard to tell these tools which Java version to use. I'll see if I can figure out what went wrong and try and fix our build so it doesn't happen again.

Flat View: This topic has 4 replies on 1 page
Topic: ScalaTest 2.0 Previous Topic   Next Topic Topic: instantiate a test database


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us