Skip to content

Commit 8f1067a

Browse files
KordyjanSethTisuebishabosha
authored
Apply suggestions from code review
Co-authored-by: Seth Tisue <[email protected]> Co-authored-by: Jamie Thompson <[email protected]>
1 parent 61bffbe commit 8f1067a

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

blog/_posts/2024-02-26-scala-3.4.0-and-3.3.2-released.md

+20-9
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ We are thrilled to announce the release of two versions of Scala 3: the first ve
1010

1111
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.
1212

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.
1414

1515
## What's new in 3.3.2 LTS (and 3.4.0 too)
1616

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.
1818

1919
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.
2020

2121
## Changes exclusive to 3.4.0
2222

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:
2424

2525
### Stabilized SIPs
2626

@@ -58,7 +58,7 @@ Release notes of [3.4.0](https://github.com/lampepfl/dotty/releases/tag/3.4.0) c
5858
```
5959

6060
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.
6262

6363
### Backend improvements
6464

@@ -67,6 +67,17 @@ Release notes of [3.4.0](https://github.com/lampepfl/dotty/releases/tag/3.4.0) c
6767

6868
### Reporting
6969

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:
78+
https://docs.scala-lang.org/scala3/reference/language-versions/binary-compatibility.html
79+
```
80+
7081
- If there is an error reading a class file, we now report the version of the classfile and a recommendation to check JDK compatibility:
7182

7283
```
@@ -78,7 +89,7 @@ Release notes of [3.4.0](https://github.com/lampepfl/dotty/releases/tag/3.4.0) c
7889
```
7990

8091
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.
8293

8394
### Experimental changes
8495

@@ -94,9 +105,9 @@ Following syntax is now deprecated and will report warnings when used:
94105
- `var x = _` (rewrite to `var x = scala.compiletime.uninitialized`)
95106
- `with` as a type operator (rewrite to `&`)
96107
- `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)
98109

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.
100111

101112
### Other source compatibility concerns
102113

@@ -124,11 +135,11 @@ All those rewrites will be performed automatically by the compiler if we run it
124135
import scala.language.`3.3`
125136
```
126137

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.)
128139

129140
## Contributors
130141

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!
132143

133144
According to `git shortlog -sn --no-merges 3.3.1..3.4.0` these are:
134145

0 commit comments

Comments
 (0)