Skip to content

add JDK 12 community build #862

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 Feb 13, 2019 · 11 comments
Closed

add JDK 12 community build #862

SethTisue opened this issue Feb 13, 2019 · 11 comments
Assignees

Comments

@SethTisue
Copy link
Member

SethTisue commented Feb 13, 2019

JDK 12 "overall feature set is frozen" (according to https://openjdk.java.net/projects/jdk/12/) as of Feb 13 2019)

we might as well install an early-access JDK 12 build and try it, see what happens, perhaps it will turn up something we ought to do something about

ea builds are here: https://jdk.java.net/12/

behemoth 1 has the lightest community build load at present

@SethTisue
Copy link
Member Author

SethTisue commented Feb 13, 2019

using
#742 (comment) as a guide,

curl -O -L 'https://download.java.net/java/early_access/jdk12/31/GPL/openjdk-12+31_linux-x64_bin.tar.gz'
sudo mv openjdk-12+31_linux-x64_bin.tar.gz /usr/lib/jvm
cd /usr/lib/jvm
sudo tar xzf openjdk-12+31_linux-x64_bin.tar.gz
sudo rm openjdk-12+31_linux-x64_bin.tar.gz
sudo mv jdk-12 java-12-openjdk-x64
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-12-openjdk-x64/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-12-openjdk-x64/bin/javac 1

@SethTisue
Copy link
Member Author

SethTisue commented Feb 13, 2019

went to https://scala-ci.typesafe.com/view/scala-2.12.x/newJob and cloned the scala-2.12.x-jdk11-integrate-community-build job to scala-2.12.x-jdk12-integrate-community-build , changing jvmVersion to 12 and assigning it to behemoth 1

https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-jdk12-integrate-community-build/

first run: https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-jdk12-integrate-community-build/1/consoleFull

Java home: /usr/lib/jvm/java-12-openjdk-x64 👍

note to self: do this for 2.13 too, but I'll probably want to get the whole 2.12 build extracting first

@SethTisue
Copy link
Member Author

SethTisue commented Feb 14, 2019

EXTRACTION FAILED (failed: scala-async, scala-collection-compat, scala-continuations, scala-java8-compat, scala-partest, scala-swing)

darn those third-party libraries and their flaky builds! oh, wait... who, us?

[scala-async] java.lang.RuntimeException: No Scala version for Java major version 12. Change your Java version or adjust `scalaVersionsByJvm` in build.sbt.
[scala-async] 	at com.lightbend.tools.scalamoduleplugin.ScalaModulePlugin$$anonfun$buildSettings$2.apply(ScalaModulePlugin.scala:50)
[scala-async] 	at com.lightbend.tools.scalamoduleplugin.ScalaModulePlugin$$anonfun$buildSettings$2.apply(ScalaModulePlugin.scala:23)

@SethTisue
Copy link
Member Author

SethTisue commented Feb 14, 2019

@SethTisue
Copy link
Member Author

SethTisue commented Feb 14, 2019

everything extracts now except:

[scala-java8-compat] [info] Compiling 1 Scala source to /home/jenkins/workspace/scala-2.12.x-jdk12-integrate-community-build/target-0.9.16/extraction/c0e9c74dc16863433bdc5fecff58e5dee33e2e27/projects/3279f8989166aa618f4fd2839ee335743e05f4e2/project/target/scala-2.10/sbt-0.13/classes...
[scala-java8-compat] [error] Class sun.invoke.empty.Empty not found - continuing with a stub.
[scala-java8-compat] [error] Class sun.invoke.empty.Empty not found - continuing with a stub.
[scala-java8-compat] [error] two errors found
[scala-java8-compat] [error] (compile:compileIncremental) Compilation failed
[scala-java8-compat] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 
[scala-java8-compat:error] java.lang.RuntimeException: 
[scala-java8-compat:error] 	at scala.sys.package$.error(package.scala:27)
[scala-java8-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtRunner.com$typesafe$dbuild$support$sbt$SbtRunner$$processCommand(SbtRunner.scala:94)
[scala-java8-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtRunner$$anonfun$run$1$$anonfun$apply$2$$anonfun$apply$3.apply(SbtRunner.scala:75)
[scala-java8-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtRunner$$anonfun$run$1$$anonfun$apply$2$$anonfun$apply$3.apply(SbtRunner.scala:75)
[scala-java8-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtRunner$$anonfun$run$1.apply(SbtRunner.scala:75)

I'll have to come back to this.

@SethTisue
Copy link
Member Author

SethTisue commented Feb 15, 2019

outside of dbuild, if I build scala-java8-compat on JDK 12, it works fine. I see error while loading String, class file '/Library/Java/JavaVirtualMachines/jdk-12.jdk/Contents/Home(java/lang/String.class)' is broken but sbt keeps on trucking, and test passes (on Scala 2.12.8)

back in the community build context, I note that warning: Class sun.invoke.empty.Empty not found - continuing with a stub. is also printed when loading the genjavadoc and scala-xml build definitions

in scala-java8-compat, project/plugins.sbt has scalacOptions += "-Xfatal-warnings" (applying to the build definition itself, not to project code), so I think that's our culprit, we just need to disable that in this context? not sure why the results would be different inside or outside dbuild, but perhaps we don't need to get to the bottom of that

EDIT: scala/scala-java8-compat#131 should fix it

@SethTisue
Copy link
Member Author

@SethTisue
Copy link
Member Author

SethTisue commented Feb 16, 2019

everything extracts now 🎉

we can track further progress at #796

@xuwei-k
Copy link
Contributor

xuwei-k commented Feb 16, 2019

I see error while loading String, class file '/Library/Java/JavaVirtualMachines/jdk-12.jdk/Contents/Home(java/lang/String.class)' is broken but sbt keeps on trucking, and test passes (on Scala 2.12.8)

scala/bug#11381

@SethTisue
Copy link
Member Author

in the first runs, 98 projects are green. that's encouraging, it means nothing catastrophic is wrong. about 10 projects fail that didn’t fail on JDK 11. I’ll gradually investigate them. usually it’s just that some silly thing in the build isn’t expecting a “12”. occasionally it’s something more substantial

@SethTisue
Copy link
Member Author

now tracking any further progress at #796

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