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-26-scala-3.4.0-and-3.3.2-released.md
+20-9
Original file line number
Diff line number
Diff line change
@@ -10,17 +10,17 @@ We are thrilled to announce the release of two versions of Scala 3: the first ve
10
10
11
11
Scala 3.4.0 code can use 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.
12
12
13
-
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, as a part of the LTS line, 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.
13
+
Scala 3.4.0 and 3.3.2 share most of the changes since the 3.3.1 version. The difference is that 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, as a part of the LTS line, maintains not only full binary compatibility but also full source compatibility. **We checked that every single one of over a thousand projects 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.
14
14
15
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), 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.
17
+
In the release notes of Scala [3.3.2 LTS](https://github.com/lampepfl/dotty/releases/tag/3.3.2), 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
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
23
-
Release notes of [3.4.0](https://github.com/lampepfl/dotty/releases/tag/3.4.0) contains a lot of substantial changes in improvements. Most noteworthy of them can be grouped in a few broad categories.
23
+
Release notes of [3.4.0](https://github.com/lampepfl/dotty/releases/tag/3.4.0) contains many substantial changes and improvements. The most noteworthy can be grouped in a few broad categories:
24
24
25
25
### Stabilized SIPs
26
26
@@ -58,7 +58,7 @@ Release notes of [3.4.0](https://github.com/lampepfl/dotty/releases/tag/3.4.0) c
58
58
```
59
59
60
60
will have its return type correctly inferred as `(List[T], List[T])`. Earlier, it would result in a rather unintuitive type error.
61
-
- The compiler now avoids generating given definitions that loop, removing long-standing footgun of implicit resolution.
61
+
- The compiler now avoids generating given definitions that loop, removing a long-standing footgun in implicit resolution.
62
62
63
63
### Backend improvements
64
64
@@ -67,6 +67,17 @@ Release notes of [3.4.0](https://github.com/lampepfl/dotty/releases/tag/3.4.0) c
67
67
68
68
### Reporting
69
69
70
+
- Scala 3.4 improves the error message when a signature from the classpath comes from an incompatible TASTy version. It has improved readability and provides a more useful diagnostic of what a user can do to fix the problem.
71
+
```
72
+
error while loading Tuple,
73
+
TASTy file /scala/Tuple.tasty could not be read, failing with:
74
+
Forward incompatible TASTy file has version 28.4, produced by Scala 3.4.0,
75
+
expected stable TASTy from 28.0 to 28.3.
76
+
To read this TASTy file, use a Scala 3.4.0 compiler or newer.
77
+
Please refer to the documentation for information on TASTy versioning:
- If there is an error reading a class file, we now report the version of the classfile and a recommendation to check JDK compatibility:
71
82
72
83
```
@@ -78,7 +89,7 @@ Release notes of [3.4.0](https://github.com/lampepfl/dotty/releases/tag/3.4.0) c
78
89
```
79
90
80
91
This will improve the user experience when the class file format changes unexpectedly. This feature will be backported to Scala 3.3.3.
81
-
- 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
92
+
- 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.
82
93
83
94
### Experimental changes
84
95
@@ -94,9 +105,9 @@ Following syntax is now deprecated and will report warnings when used:
94
105
-`var x = _` (rewrite to `var x = scala.compiletime.uninitialized`)
95
106
-`with` as a type operator (rewrite to `&`)
96
107
-`xs: _*` varargs (rewrite to `xs*`)
97
-
- trailing `_` to force eta expansion (can be just ommitted)
108
+
- trailing `_` to force eta expansion (can be just omitted)
98
109
99
-
All those rewrites will be performed automatically by the compiler if we run it with `-rewrite -source 3.4-migration` flags.
110
+
All those rewrites will be performed automatically by the compiler if you run it with `-rewrite -source 3.4-migration` flags.
100
111
101
112
### Other source compatibility concerns
102
113
@@ -124,11 +135,11 @@ All those rewrites will be performed automatically by the compiler if we run it
124
135
importscala.language.`3.3`
125
136
```
126
137
127
-
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)
138
+
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.)
128
139
129
140
## Contributors
130
141
131
-
Thank you to all the contributors who made the release of 3.4.0 and 3.3.2 LTS possible
142
+
Thank you to all the contributors who made the release of 3.4.0 and 3.3.2 LTS possible!
132
143
133
144
According to `git shortlog -sn --no-merges 3.3.1..3.4.0` these are:
0 commit comments