Skip to content

Commit 2827545

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

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

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

+28-23
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
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

1010
An API used in the `lazy val` implementation will be removed in a future JDK.
1111
Its replacement is only available on JDK 9+. Therefore, the Scala 3 Next minors
@@ -14,26 +14,28 @@ in 2025 Q4 and the next LTS will drop JDK 8 support.
1414
## Intro
1515

1616
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.
17+
dropping support for JDK 8 and is considering which later JDK to require —
18+
perhaps 11, perhaps 17.
1819

1920
## Immediate motivation
2021

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

3032
## Long term motivation
3133

3234
Switching to a newer version of the JDK would allow both the compiler and the
3335
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
36+
brought in by JDK 9+. This might include a number of JEPs (JDK Enhancement
37+
Proposals), which the compiler team will investigate during the coming year. To
38+
check the current status, take a look at the issues marked with the
3739
[JEP label](https://github.com/scala/scala3/issues?q=is%3Aissue+is%3Aopen+label%3Acompat%3Ajava%3Ajep).
3840

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

7577
- [Spring 6](https://spring.io/blog/2022/11/16/spring-framework-6-0-goes-ga)
76-
will require JDK 17
78+
requires JDK 17
7779
- [Hibernate](https://hibernate.org/orm/releases/6.6/) requires JDK 11 and the
7880
next version will require JDK 17
7981
- [Jetty](https://jetty.org/docs/jetty/12/index.html) requires JDK 17
8082
- [Logback](https://logback.qos.ch/dependencies.html) requires JDK 11
8183
- [JavaFX](https://gluonhq.com/products/javafx/) requires JDK 21
82-
- [Vaadin](https://github.com/vaadin/platform/releases/tag/24.6.0) requires JDK 17
84+
- [Vaadin](https://github.com/vaadin/platform/releases/tag/24.6.0) requires JDK
85+
17
8386
- [Quarkus](https://quarkus.io/blog/quarkus-3-7-released/) requires JDK 17
8487
- [TensorFlow](https://github.com/tensorflow/java) requires JDK 11
8588

@@ -98,15 +101,15 @@ Scala examples include:
98101
the board
99102

100103
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,
104+
will avoid having to switch to a newer JDK. However, that is highly discouraged,
102105
as it will make you vulnerable to potential security risks.
103106

104107
## Plan for making the switch
105108

106109
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.
110+
of Scala 3 and in the next LTS. The new minimum JDK will be either 11 or 17,
111+
depending on the community feedback and our investigations. The current estimate
112+
for the next LTS is Q4 2025.
110113

111114
One major challenge will be to preserve backward compatibility. As we change the
112115
encoding of `lazy val`s, we must still be able to use libraries compiled with
@@ -117,14 +120,16 @@ earlier Scala 3 versions.
117120
The current line of LTS under 3.3.x will be supported for at least another year
118121
after the release of the next LTS version. That should give you plenty of time
119122
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!
123+
versions supporting JDK 8.
121124

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.
125+
If you are using Scala 3 on JDK 8, do let us know! If it is not possible for you
126+
to switch, be sure to send us your feedback so that we can figure out a way to
127+
help you migrate.
124128

125129
## Discussions and further reading
126130

127131
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
132+
[this issue](https://github.com/scala/scala3/issues/9013).
133+
134+
Discussions on the topic of dropping JDK 8 support will soon be available on the
130135
[Scala contributors forum](https://contributors.scala-lang.org/)

0 commit comments

Comments
 (0)