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
Copy file name to clipboardExpand all lines: blog/_posts/2024-02-xx-scala-3.4.0-and-3.3.2-released.md
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -4,19 +4,19 @@ post-type: blog
4
4
by: Paweł Marks, VirtusLab
5
5
title: Scala 3.4.0 and 3.3.2 LTS released!
6
6
---
7
-
We are thrilled to announce the release of two awaited versions of Scala: the first one in the 3.4 minor line and the patch for the Long Term Support line.
7
+
We are thrilled to announce the release of two versions of Scala 3: the first version in the 3.4 minor line, and a patch version in the Long Term Support line.
8
8
9
9
## ... so which version should I update to?
10
10
11
-
Scala 3.4.0 and 3.3.2 share most of the changes compared to the 3.3.1 version. The difference is that while there are new features and deprecations of legacy mechanisms in Scala 3.4.0, version 3.3.2 is focused solely on bug fixes and usability improvements. What's more, it maintains not only full output compatibility but also full source compatibility. **This means that every single one from over a thousand projects that we have checked that worked correctly with 3.3.1 is also working now with 3.3.2.**This required us to be extra careful with picking changes for that release. Because of that, not every bug that is fixed in 3.4.0 is also fixed in 3.3.2. Some of the not-ported changes only require some additional work, so you may expect them in 3.3.3.
11
+
Scala 3.4.0 and 3.3.2 share most of the changes since the 3.3.1 version. The difference Scala 3.4.0 adds new features and deprecates legacy mechanisms, while version 3.3.2 is focused solely on bug fixes and usability improvements. What's more, 3.3.2 maintains not only full output compatibility but also full source compatibility. **This means that every single one from over a thousand projects we checked that worked with 3.3.1 still work with 3.3.2.**To achieve this, we had to be extra careful with selecting changes for that release. Thus, not every bug that is fixed in 3.4.0 is also fixed in 3.3.2. Some of the not-ported changes might still land in 3.3.3.
12
12
13
13
Scala 3.4.0 code can depend on dependencies compiled with Scala 3.3.x, but not the other way around. That means that if you are a library author, you should consider staying on the LTS line. If you are working on a project that is not meant to be used as an external dependency, feel free to update to Scala 3.4.0, especially if you are starting a new project.
14
14
15
-
## What's new in 3.3.2 LTS and 3.4.0
15
+
## What's new in 3.3.2 LTS (and 3.4.0 too)
16
16
17
-
If you go through the release notes of Scala [3.3.2 LTS](https://github.com/lampepfl/dotty/releases/tag/3.3.2) and [3.4.0](https://github.com/lampepfl/dotty/releases/tag/3.4.0), you can see a lot of bug fixes. One area that received special attention in that regard was coverage support. With most pains fixed, we are right now confident in the state of coverage.
17
+
If you go through the release notes of Scala [3.3.2 LTS](https://github.com/lampepfl/dotty/releases/tag/3.3.2) and [3.4.0](https://github.com/lampepfl/dotty/releases/tag/3.4.0), you can see a lot of bug fixes. One area that received special attention in that regard was coverage support. With most pains fixed, we are now confident in the state of coverage.
18
18
19
-
The other important, but invisible at first, change is integration of the presentation compiler into the compiler itself. This simplifies the lives of tooling developers and allows for a more stable and reliable user experience when using Metals.
19
+
Another important change, not directly visible to end users, is the integration of the presentation compiler into the compiler itself. This makes building tooling easier and allows for a more stable and reliable user experience when using Metals.
20
20
21
21
## Changes exclusive to 3.4.0
22
22
@@ -55,6 +55,7 @@ The other important, but invisible at first, change is integration of the presen
55
55
```
56
56
57
57
This will improve the user experience when the class file format changes unexpectedly. This feature will be backported to Scala 3.3.3.
58
+
- Progress reporting of compilation is now visible in IDEs. Metals IDE users will notice that compilation progress is no longer frozen at 0% when using sbt or bloop as the BSP server. IntelliJ will also correctly report progress for BSP and sbt based projects
58
59
- Type inference for functions similar to fold is greatly improved. For example:
59
60
60
61
```scala
@@ -65,7 +66,7 @@ The other important, but invisible at first, change is integration of the presen
65
66
```
66
67
67
68
will have its return type correctly inferred as `(List[T], List[T])`. Earlier, it would result in a rather unintuitive type error.
68
-
-In 3.4, refutable patterns (i.e., patterns that might not match) in a for-comprehension generator must now be preceded by `case`, or an error is reported.
69
+
-Refutable patterns (i.e., patterns that might not match) in a for-comprehension generator must now be preceded by `case`, or an error is reported.
69
70
70
71
e.g.
71
72
@@ -89,9 +90,9 @@ The other important, but invisible at first, change is integration of the presen
89
90
importscala.language.`3.3`
90
91
```
91
92
92
-
alternatively, the definition can changed to transparent inline, but as this is a TASTy breaking change, it is not a default recommendation. (Also, `inline` should be preferred when possible over `transparent inline` for reduced binary size)
93
+
alternatively, the definition can be changed to `transparent inline`, but as this is a TASTy breaking change, it is not a default recommendation. (Also, `inline` should be preferred when possible over `transparent inline` for reduced binary size)
93
94
- JVM Backend parallelization has been ported from Scala 2.13 to Scala 3.
94
-
- The compiler now avoids generating given definitions that loop, removing long-standing footman of implicit resolution.
95
+
- The compiler now avoids generating given definitions that loop, removing long-standing footgun of implicit resolution.
0 commit comments