Skip to content

Commit 54870ec

Browse files
committed
chore: Add more review comments
1 parent baf2899 commit 54870ec

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

_posts/2025-02-01-next-scala-lts.md

+29-26
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
---
22
category: announcement
33
permalink: /news/next-scala-lts.html
4-
title: "Next Scala 3 LTS version"
4+
title: "Next Scala 3 LTS version will increase minimum required JDK version"
55
by: Tomasz Godzik
66
---
77

8-
**TLDR;**
8+
**TL;DR**
99

10-
An API used in the `lazy val` implementation will be removed in a future JDK.
11-
Its replacement is only available on JDK 9+. Therefore, the Scala 3 Next minors
12-
in 2025 Q4 and the next LTS will drop JDK 8 support.
10+
The Scala 3 Next minors in 2025 Q4 and the next LTS will drop JDK 8 support. We are seeking feedback on whether the new minimum JDK should be 11 or 17.
1311

1412
## Intro
1513

1614
For the compiler’s second LTS version, the Scala 3 compiler team will be
17-
dropping support for JDK 8 and is considering which later JDK to use.
15+
dropping support for JDK 8 and is considering which later JDK to require —
16+
perhaps 11, perhaps 17.
1817

1918
## Immediate motivation
2019

2120
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.
21+
methods in `sun.misc.Unsafe` are scheduled for removal in a future release.
22+
Currently, Scala 3 uses `sun.misc.Unsafe` in its implementation of lazy values.
2423
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). It also started
27-
to dawn on the compiler team that we might consider stopping to support JDK 8
28-
altogether in a future release of Scala 3.
24+
will need to drop usage of `Unsafe`. We are investigating the required changes
25+
under [this issue](https://github.com/scala/scala3/issues/9013).
26+
27+
It also started to dawn on the compiler team that we might consider dropping
28+
support for JDK 8 altogether in a future release of Scala 3.
2929

3030
## Long term motivation
3131

3232
Switching to a newer version of the JDK would allow both the compiler and the
3333
Scala ecosystem to start using new features and standard library improvements
34-
brought in by JDK 9+. brought in by JDK 9+. This might include a number of JEPs,
35-
which the compiler team will investigate during the coming year. To check the
36-
current status, take a look at the issues marked with the
34+
brought in by JDK 9+. This might include a number of JEPs (JDK Enhancement
35+
Proposals), which the compiler team will investigate during the coming year. To
36+
check the current status, take a look at the issues marked with the
3737
[JEP label](https://github.com/scala/scala3/issues?q=is%3Aissue+is%3Aopen+label%3Acompat%3Ajava%3Ajep).
3838

3939
Some of the features that might be interesting to the Scala community are:
@@ -73,13 +73,14 @@ support in favor of JDK 11 or even 17.
7373
Java examples include:
7474

7575
- [Spring 6](https://spring.io/blog/2022/11/16/spring-framework-6-0-goes-ga)
76-
will require JDK 17
76+
requires JDK 17
7777
- [Hibernate](https://hibernate.org/orm/releases/6.6/) requires JDK 11 and the
7878
next version will require JDK 17
7979
- [Jetty](https://jetty.org/docs/jetty/12/index.html) requires JDK 17
8080
- [Logback](https://logback.qos.ch/dependencies.html) requires JDK 11
8181
- [JavaFX](https://gluonhq.com/products/javafx/) requires JDK 21
82-
- [Vaadin](https://github.com/vaadin/platform/releases/tag/24.6.0) requires JDK 17
82+
- [Vaadin](https://github.com/vaadin/platform/releases/tag/24.6.0) requires JDK
83+
17
8384
- [Quarkus](https://quarkus.io/blog/quarkus-3-7-released/) requires JDK 17
8485
- [TensorFlow](https://github.com/tensorflow/java) requires JDK 11
8586

@@ -98,15 +99,15 @@ Scala examples include:
9899
the board
99100

100101
It is always possible not to update your libraries and compiler version, which
101-
will avoid having to switch to a newer JDK. However, it is highly discouraged,
102+
will avoid having to switch to a newer JDK. However, that is highly discouraged,
102103
as it will make you vulnerable to potential security risks.
103104

104105
## Plan for making the switch
105106

106107
The current plan is to drop support of JDK 8 in one of the future minor releases
107-
of Scala 3 and in the next LTS. The JDK will be either 11 or 17, depending on
108-
the community feedback and our investigations. The current estimate for the next
109-
LTS is Q4 2025.
108+
of Scala 3 and in the next LTS. The new minimum JDK will be either 11 or 17,
109+
depending on the community feedback and our investigations. The current estimate
110+
for the next LTS is Q4 2025.
110111

111112
One major challenge will be to preserve backward compatibility. As we change the
112113
encoding of `lazy val`s, we must still be able to use libraries compiled with
@@ -117,14 +118,16 @@ earlier Scala 3 versions.
117118
The current line of LTS under 3.3.x will be supported for at least another year
118119
after the release of the next LTS version. That should give you plenty of time
119120
to migrate. After that, no more security fixes will be available for Scala 3
120-
versions supporting JDK 8. If you are using Scala 3 on JDK 8, do let us know!
121+
versions supporting JDK 8.
121122

122-
If it is not possible for you to switch, be sure to send us your feedback so
123-
that we can figure out a way to help you migrate.
123+
If you are using Scala 3 on JDK 8, do let us know! If it is not possible for you
124+
to switch, be sure to send us your feedback so that we can figure out a way to
125+
help you migrate.
124126

125127
## Discussions and further reading
126128

127129
You can track the current work related to lazy values under
128-
[this issue](https://github.com/scala/scala3/issues/9013). Discussions on the
129-
topic of dropping JDK 8 support will soon be available on the
130+
[this issue](https://github.com/scala/scala3/issues/9013).
131+
132+
Discussions on the topic of dropping JDK 8 support will soon be available on the
130133
[Scala contributors forum](https://contributors.scala-lang.org/)

0 commit comments

Comments
 (0)