olafurpg / setup-scala

GitHub Action to install any version of Java (GraalVM, Java 8, Java 11, Java 14, ...) via Jabba. Works for any JVM language including Java, Scala and Kotlin.
MIT License
168 stars 30 forks source link

java9 runtime added? #22

Closed er1c closed 4 years ago

er1c commented 4 years ago
[info] Compiling 53 Scala sources and 1 Java source to /home/runner/work/fm-common/fm-common/core/jvm/target/scala-2.11/test-classes ...
[error] /home/runner/work/fm-common/fm-common/core/jvm/src/test/scala/fm/common/TestPunycode.scala:346:20: object idn is not a member of package sun.net
[error]     import sun.net.idn.{Punycode => SunPunycode}
[error]    

Works fine locally, I think it's because I'm using official sbt instead of sbt-extras

It's related to making sure the java9+ runtime is available: (https://github.com/sbt/sbt-launcher-package/tree/master/java9-rt-export/src/main/java/io/github/retronym/java9rtexport)

olafurpg commented 4 years ago

Thank you for reporting! Can you elaborate on what is the issue? The Java version is configurable as documented here https://github.com/olafurpg/setup-scala#usage

The default Java version is the latest OpenJDK 8 HotSpot version via AdoptOpenJDK

er1c commented 4 years ago

This kind of works around the problem: https://github.com/er1c/fm-common/commit/179ce9dcf3579dec4c6d4ad22d5620d36efa62d0

But now I'm running into an error about the jsdom library not being imported properly.

I think I just need to use the official sbt-launcher script

olafurpg commented 4 years ago

I'm still not sure I understand the root issue. I use the current sbt launcher on Java 8 and 11 without issues

olafurpg commented 4 years ago

Closing since I'm not sure what is needed to resolve this issue.