You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elaborate on our policy for supporting JVM versions
There are two axes regarding the required or supported JVM version:
- running Scala code,
- compiling Scala code,
and on both there is a lower and upper bound of the supported JVM.
Scala runs primarily on the Java Virtual Machine (JVM). As Scala and the JVM improve independently over time, Scala drops compatibility with older versions of the Java Developer Kit (JDK) in order to focus development efforts on supporting new JVM features that benefit Scala.
15
15
16
-
This table shows the first Scala release in each series that functions on each JDK.
16
+
This table shows the first Scala release in each series that functions on each JVM release.
17
17
18
-
|JDK version | First Scala release supporting JDK version per series|
18
+
|JVM version | First Scala compiler release supported to run on this JVM|
### Running versus compiling and required / supported JVM
26
+
For most users, we recommend using Java 8 for *compiling* (and running) Scala code. Since the JVM is backward compatible, it is usually safe to use a newer JVM to *run* your code compiled by the Scala compiler for older JVM versions. There are notable exceptions with experimental/unsafe features, and the introduction of the module system in Java 9. The Scala compiler does usually need updates to run properly on newer versions of the JVM, so make sure to use the appropriate JVM when compiling your code.
27
+
28
+
Issues with using the Scala compiler on *non-LTS* versions of Java will not necessarily be considered blockers for releases, but we will do our best to run CI on more versions of Java to catch bugs early, and to fix them as quickly as reasonably possible. If regressions do occur with non-LTS (or, generally, unsupported) versions of Java, we may bring the next minor release deadline a bit closer, so that these issues are generally resolved within a month or two. Lightbend does offer commercial support for faster resolution of issues like this.
29
+
30
+
The next step is to bump the *required* JVM versions for a Scala release, as we did for Scala 2.12 (raising the minimum JVM for compiling and running from version from 6 to 8). To leverage new features offered by a JVM release, we generally must drop support for older JVMs.
31
+
25
32
### JDK 9 compatibility notes
26
33
27
-
As of Scala 2.12.4 and 2.11.12, **JDK 9 support is incomplete**. Notably, `scalac` will not enforce the restrictions of the Java Platform Module System, which means that code that typechecks may incur linkage errors at runtime.
34
+
As of Scala 2.12.5 and 2.11.12, **JDK 9 support is incomplete**. Notably, `scalac` will not enforce the restrictions of the Java Platform Module System, which means that code that typechecks may incur linkage errors at runtime.
28
35
29
36
JDK 9 support requires minimum sbt version 1.1.0, or 0.13.17 in the 0.13.x series.
0 commit comments