11---
22category : announcement
33permalink : /news/next-scala-lts.html
4- title : " Next Scala 3 LTS version will increase minimum required JDK version"
4+ title : " Next Scala 3 LTS series will increase minimum required JDK version"
55by : Tomasz Godzik
66---
77
@@ -10,22 +10,16 @@ by: Tomasz Godzik
1010The Scala 3 Next minors in 2025 Q4 and the next LTS will drop JDK 8 support. We
1111are seeking feedback on whether the new minimum JDK should be 11 or 17.
1212
13- ## Intro
14-
15- For the compiler’s second LTS version, the Scala 3 compiler team will be
16- dropping support for JDK 8 and is considering which later JDK to require —
17- perhaps 11, perhaps 17.
18-
1913## Immediate motivation
2014
21- The recent [ JEP 471 ] ( https://openjdk.org/jeps/471 ) stated that the memory-access
22- methods in ` sun.misc.Unsafe ` are scheduled for removal in a future release .
23- Currently, Scala 3 uses ` sun.misc.Unsafe ` in its implementation of lazy values .
24- This was needed due to compatibility with JDK 8. In order to support JDK 25+, we
25- will need to drop usage of ` Unsafe ` . We are investigating the required changes
26- under [ this issue] ( https://github.com/scala/scala3/issues/9013 ) .
15+ The memory-access methods in ` sun.misc.Unsafe ` are scheduled for removal in a
16+ future JDK, as stated in the recent [ JEP 471 ] ( https://openjdk.org/jeps/471 ) .
17+ Currently, Scala 3 uses ` sun.misc.Unsafe ` in its implementation of ` lazy val ` .
18+ In order to support JDK 25+, we will need to drop usage of ` Unsafe ` . We are
19+ investigating the required changes under
20+ [ this issue] ( https://github.com/scala/scala3/issues/9013 ) .
2721
28- It also started to dawn on the compiler team that we might consider dropping
22+ It then started to dawn on the compiler team that we might consider dropping
2923support for JDK 8 altogether in a future release of Scala 3.
3024
3125## Long term motivation
@@ -40,11 +34,10 @@ check the current status, take a look at the issues marked with the
4034Some of the features that might be interesting to the Scala community are:
4135
4236- [ JEP 181] ( https://github.com/scala/scala3/issues/22292 ) will allow classes
43- that are logically part of the same code entity, but which are compiled to
44- distinct class files, to access each other's private members. This is
45- especially useful for nested classes or companions. Currently, the Scala
46- compiler has to insert public bridge methods to broaden the accessibility of
47- those members.
37+ that are logically connected, to access each other's private members. This
38+ could be useful for representing nested classes and companion objects.
39+ (Currently, the Scala compiler has to insert public bridge methods to broaden
40+ the accessibility of those members.)
4841- [ JEP 409] ( https://github.com/scala/scala3/issues/22298 ) introduces sealed
4942 classes. It would allow the compiler to better represent Scala's sealed trait
5043 hierarchies.
@@ -60,15 +53,16 @@ authors. They currently have to take into account a large number of different
6053versions, both for correctness and performance. Thus, the benefits of this
6154change will be felt ecosystem-wide.
6255
63- JDK 8 was first published on 18th March 2014, over 10 years ago. JDKs have
64- advanced greatly through that period . In order to stay competitive, using those
65- advancements is a must. A lot of the existing distributions, such as
66- [ Oracle's one ] ( https://www.oracle.com/java/technologies/java-se-support-roadmap.html ) ,
56+ JDK 8 was first published in 2014, over 10 years ago. JDKs have advanced greatly
57+ since then . In order to stay competitive, using those advancements is a must. A
58+ lot of the existing distributions, including
59+ [ Oracle's own ] ( https://www.oracle.com/java/technologies/java-se-support-roadmap.html ) ,
6760have already stopped or will soon stop updating JDK 8 with security and other
68- fixes. Staying on JDK 8 might directly impact issues within your business
69- applications.
61+ fixes. It is of course possible not to update your libraries and compiler
62+ version, to avoid having to switch to a newer JDK. However, that is highly
63+ discouraged, as it will make you vulnerable to potential security risks.
7064
71- Some larger projects within JVM and Scala ecosystems have already dropped JDK 8
65+ Some larger projects in the Java and Scala ecosystems have already dropped JDK 8
7266support in favor of JDK 11 or even 17.
7367
7468Java examples include:
@@ -99,9 +93,7 @@ Scala examples include:
9993- [ Li Haoyi's ecosystem] ( https://github.com/com-lihaoyi ) requires JDK 11 across
10094 the board
10195
102- It is always possible not to update your libraries and compiler version, which
103- will avoid having to switch to a newer JDK. However, that is highly discouraged,
104- as it will make you vulnerable to potential security risks.
96+ This shows that the rest of the industry is already moving away from JDK 8.
10597
10698## Plan for making the switch
10799
0 commit comments