Skip to content

Commit f0f47c5

Browse files
authored
Merge pull request #1292 from SethTisue/jdk12
add JDK 12 info to JDK compat page
2 parents 18bac56 + 1a3004d commit f0f47c5

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

_overviews/jdk-compatibility/overview.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ This table shows the first Scala release in each series that works with each JVM
1717

1818
| JVM version | Minimum Scala versions |
1919
|:-----------:|:----------------------------------------------------------------------------------------------|
20-
| 11 | 2.12.4, 2.11.12, 2.10.7 |
20+
| 12 | see [below](#jdk-12-compatibility-notes) |
21+
| 11 | 2.12.4, 2.11.12, 2.10.7 (but also, see [below](#jdk-11-compatibility-notes)) |
2122
| 8 | 2.12.0, 2.11.0, 2.10.2 |
2223
| 7 | 2.11.0, 2.10.0 |
2324
| 6 | 2.11.0, 2.10.0 |
2425

25-
For more information on Java 11 (and 9 and 10), see [below](#jdk-11-compatibility-notes).
26-
2726
## Running versus compiling
2827

2928
We recommend using Java 8 for *compiling* 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.
@@ -48,4 +47,31 @@ As of Scala 2.12.8 and 2.11.12, **JDK 11 support is incomplete**. Notably, `scal
4847

4948
JDK 11 support requires minimum sbt version 1.1.0, or 0.13.17 in the 0.13.x series.
5049

51-
For more information on JDK 11 compatibility, watch the ["Support JDK 11"](https://github.com/scala/scala-dev/issues/139 "scala/scala-dev #139") issue on GitHub. To help with testing on Java 11, see [scala/scala-dev#559](https://github.com/scala/scala-dev/issues/559).
50+
To track progress on JDK 11 compatibility, watch:
51+
52+
* the ["Support JDK 11"](https://github.com/scala/scala-dev/issues/139 "scala/scala-dev #139") issue
53+
* the [jdk11 label](https://github.com/scala/bug/labels/jdk11) in scala/bug
54+
55+
To help with testing on JDK 11, see [scala/scala-dev#559](https://github.com/scala/scala-dev/issues/559).
56+
57+
## JDK 12 compatibility notes
58+
59+
As of February 2019, JDK 12 is not in full release, but early-access builds are available. Note that even the final JDK 12 release will not be an LTS release, so the remarks above about non-LTS releases apply.
60+
61+
Scala has not yet been extensively tested on JDK 12.
62+
63+
However, the Scala 2.12 community build is [up and running](https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-jdk12-integrate-community-build/) on an early-access JDK 12 build, and most projects are green.
64+
65+
Two significant known issues with Scala 2.12.8 on JDK 12 are:
66+
67+
* the `-release` flag doesn't work ([scala/bug#11403](https://github.com/scala/bug/issues/11403))
68+
* the optimizer doesn't work ([scala/bug#11372](https://github.com/scala/bug/issues/11372))
69+
70+
Both issues have already been fixed. The fixes will be included in [Scala 2.12.9](https://github.com/scala/scala/milestone/77). A release date for 2.12.9 has not been set. In the meantime, consider using a [Scala nightly build](https://stackoverflow.com/questions/40622878/how-do-i-tell-sbt-to-use-a-nightly-build-of-scala-2-12-or-2-13) to test the fixes.
71+
72+
In other respects, so far it appears that 12 is similar to 11 with respect to Scala compatibility.
73+
74+
To track progress on JDK 12 compatibility, watch:
75+
76+
* the [jdk12 label](https://github.com/scala/bug/labels/jdk12) in scala/bug (as well as the [jdk11 label](https://github.com/scala/bug/labels/jdk11))
77+
* the JDK 11 and 12 community build ticket ([scala/community-builds#796](https://github.com/scala/community-builds/issues/796))

0 commit comments

Comments
 (0)