Skip to content

tests no longer compile/run on Java 6 #168

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

Closed
SethTisue opened this issue Oct 19, 2017 · 7 comments
Closed

tests no longer compile/run on Java 6 #168

SethTisue opened this issue Oct 19, 2017 · 7 comments

Comments

@SethTisue
Copy link
Member

SethTisue commented Oct 19, 2017

#166 adds references to java.util.Base64 to jvm/src/test, but that's Java 8 API, doesn't exist on Java 6 or 7

which also raises a meta-issue: why didn't Travis-CI catch it?

caught by the Scala community build, at e.g. https://scala-ci.typesafe.com/view/scala-2.11.x/job/scala-2.11.x-integrate-community-build/822/

@SethTisue
Copy link
Member Author

SethTisue commented Oct 19, 2017

(I've heard that Java 9 adds a --release option you can use to catch things like this without having to build or run on the old JDK)

@ashawley
Copy link
Member

Bleh, well that's good dbuild caught it. Looks like Travis failed to switch to openjdk6, but silently kept going:

$ jdk_switcher use openjdk6
Switching to OpenJDK6 (java-1.6.0-openjdk-amd64), JAVA_HOME will be set to /usr/lib/jvm/java-6-openjdk-amd64
update-java-alternatives: directory does not exist: /usr/lib/jvm/java-1.6.0-openjdk-amd64

Looks like this is a new issue when the Ubuntu build infrastructure was upgraded from precise to trusty.

@ashawley ashawley mentioned this issue Oct 19, 2017
@ashawley
Copy link
Member

Ripping out the Base64 code revealed another issue, which is that org.apache.commons.commons-lang3 is Java 7 as well. Might be able to use an earlier version.

@ashawley
Copy link
Member

ashawley commented Oct 19, 2017

And now a third issue which is that Scala.js test suite fails in Java 6. We updated the scalajs plugin from 0.6.16 to 0.6.20 in 25c7dc3, and that seems to be the breaking change.

Might this be fixed in the next release of Scala.js in scala-js/scala-js#3128

> xmlJS/test
[info] Fast optimizing scala-xml/js/target/scala-2.11/scala-xml-test-fastopt.js
java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
	at org.scalajs.testcommon.RPCCore.close(RPCCore.scala:155)
	at org.scalajs.testadapter.ComJSEnvRPC.close(ComJSEnvRPC.scala:59)
	at org.scalajs.testadapter.ScalaJSRunner$$anonfun$waitAndClose$1$1.apply(ScalaJSRunner.scala:69)
	at org.scalajs.testadapter.ScalaJSRunner$$anonfun$waitAndClose$1$1.apply(ScalaJSRunner.scala:69)
	at scala.util.Success$$anonfun$map$1.apply(Try.scala:206)
	at scala.util.Try$.apply(Try.scala:161)
	at scala.util.Success.map(Try.scala:206)
	at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
	at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)

@ashawley
Copy link
Member

I've fixed the meta-issue with Travis and the three issues with Java 6. This should have fixed community-build for Scala 2.11

@SethTisue
Copy link
Member Author

let's see: https://scala-ci.typesafe.com/view/scala-2.11.x/job/scala-2.11.x-integrate-community-build/824/consoleFull (404 til Jenkins gets out of bed and does 100 pushups while repeating his personal daily affirmations under his breath)

@SethTisue
Copy link
Member Author

[info] >>> The dbuild result is------------: SUCCESS (project rebuilt ok)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants