From 9c67f46950f669d2a7e1b025cfbd8c6eaa528328 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 29 Nov 2021 12:17:41 -0800 Subject: [PATCH 1/2] JDK compat page: update JDK 17 wordings --- _overviews/jdk-compatibility/overview.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/_overviews/jdk-compatibility/overview.md b/_overviews/jdk-compatibility/overview.md index bb8dc57605..7ab23ea3c9 100644 --- a/_overviews/jdk-compatibility/overview.md +++ b/_overviews/jdk-compatibility/overview.md @@ -26,9 +26,11 @@ Lightbend offers [commercial support](https://www.lightbend.com/lightbend-platfo ## Running versus compiling -We generally recommend JDK 8 or 11 for *compiling* Scala code. Since the JVM tends to be backward compatible, it is usually safe to use a newer JVM for *running* your code, especially if you are not using JVM features designated "experimental" or "unsafe". +JDK 8, 11, and 17 are all good choices both for *compiling* and *running* Scala code. -If you compile on JDK 11+ but have users on JDK 8, additional care is needed to avoid using APIs and features that don't exist in 8. Therefore, compiling on 8 may be the safer choice. Some Scala developers use JDK 11+ for their daily work but do release builds on JDK 8. +Since the JVM is normally backwards compatible, it is usually safe to use a newer JVM for *running* your code than the one it was compiled on, especially if you are not using JVM features designated "experimental" or "unsafe". + +If you compile on JDK 11+ but have users on an older JDK version, additional care is needed to avoid using APIs and features that don't exist in 8. Therefore, *compiling* on 8 may be the safest choice in this scenario. (Some Scala developers use JDK 11 or 17 for their daily work, but do release builds on JDK 8.) Additionally, you can also run your Scala application on GraalVM which is a JVM. GraalVM performs well on the Scala benchmarks, and it benefits from GraalVM runtime and runs faster too. @@ -60,7 +62,7 @@ The Scala compiler does not enforce the restrictions of the Java Platform Module For sbt users, JDK 11 support requires minimum sbt version 1.1.0. sbt 1.3.9 or newer is recommended. (If you are still on the 0.13.x series, use 0.13.18.) -To track progress on JDK 11 related issues, watch: +To track progress on JDK 11 related issues in Scala, watch: * the ["Support JDK 11"](https://github.com/scala/scala-dev/issues/139 "scala/scala-dev #139") issue * the [jdk11 label](https://github.com/scala/bug/labels/jdk11) in scala/bug @@ -73,7 +75,9 @@ Scala 2.13.6 and 2.12.15 support JDK 17. The Scala test suite and Scala community build are green on JDK 17. -For possible issues, see the [jdk11](https://github.com/scala/bug/labels/jdk11) and [jdk17](https://github.com/scala/bug/labels/jdk17) labels in the Scala 2 bug tracker. +For sbt users, sbt 1.6.0-RC1 is the first version to fully support JDK 17, but 1.5.5 works fine too. (It will print a warning on startup about `TrapExit` that you can ignore.) + +For possible Scala issues, see the [jdk11](https://github.com/scala/bug/labels/jdk11) and [jdk17](https://github.com/scala/bug/labels/jdk17) labels in the Scala 2 bug tracker. ## JDK 18 compatibility notes From 6a781e1ed650a11fafca08b2cfcd12b266353ece Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 29 Nov 2021 12:52:55 -0800 Subject: [PATCH 2/2] Update _overviews/jdk-compatibility/overview.md Co-authored-by: eugene yokota --- _overviews/jdk-compatibility/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_overviews/jdk-compatibility/overview.md b/_overviews/jdk-compatibility/overview.md index 7ab23ea3c9..3863ce22af 100644 --- a/_overviews/jdk-compatibility/overview.md +++ b/_overviews/jdk-compatibility/overview.md @@ -75,7 +75,7 @@ Scala 2.13.6 and 2.12.15 support JDK 17. The Scala test suite and Scala community build are green on JDK 17. -For sbt users, sbt 1.6.0-RC1 is the first version to fully support JDK 17, but 1.5.5 works fine too. (It will print a warning on startup about `TrapExit` that you can ignore.) +For sbt users, sbt 1.6.0-RC1 is the first version to support JDK 17, but in practice sbt 1.5.5 may also work. (It will print a warning on startup about `TrapExit` that you can ignore.) For possible Scala issues, see the [jdk11](https://github.com/scala/bug/labels/jdk11) and [jdk17](https://github.com/scala/bug/labels/jdk17) labels in the Scala 2 bug tracker.