Skip to content

Commit ca9df62

Browse files
Add release notes for Scala 3.8.2 (#1889)
Signed-off-by: Wojciech Mazur <wmazur@virtuslab.com>
1 parent 53913cc commit ca9df62

File tree

3 files changed

+61
-2
lines changed

3 files changed

+61
-2
lines changed

_data/scala-releases.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- category: current_version
22
title: Current 3.8.x release
3-
version: 3.8.1
4-
release_date: January 22, 2026
3+
version: 3.8.2
4+
release_date: February 24, 2026
55
- category: current_version
66
title: Current 3.3.x LTS release
77
version: 3.3.7

_downloads/2026-02-24-3.8.2.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Scala 3.8.2
3+
start: 24 February 2026
4+
layout: downloadpage
5+
release_version: 3.8.2
6+
release_date: "February 24, 2026"
7+
permalink: /download/3.8.2.html
8+
license: <a href="https://www.scala-lang.org/license/">Apache License, Version 2.0</a>
9+
api_docs: https://www.scala-lang.org/api/3.8.2/
10+
---
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
category: release
3+
permalink: /news/3.8.2/
4+
title: "Scala 3.8.2 is now available!"
5+
by: Wojciech Mazur, VirtusLab
6+
---
7+
# Scala 3.8.2 is now available!
8+
9+
## Release highlights
10+
11+
### Warning for `for` with many `val`s and overloaded `map` ([#25090](https://github.com/scala/scala3/pull/25090))
12+
13+
Scala 3.8’s **betterFors** (available since 3.7 under `-preview`) changes for-comprehension desugaring and removes an intermediate `map` used for consecutive `val` bindings.
14+
15+
The following code snippet behaves differently at runtime depending on Scala version used for compilation. In Scala 3.7.x and earlier it produces `List((43,29), (43,30), (43,31))`, but starting with 3.8 it results in `Map(43 -> 31)`.
16+
17+
```scala
18+
def f(x: Int): (Int, Int) = (1, x)
19+
20+
val result: Iterable[(Int, Int)] =
21+
for // warning: For comprehension with multiple val assignments may change result type
22+
(k, v) <- Map(1 -> 1, 2 -> 1, 3 -> 1)
23+
x = k + v
24+
(a, b) = f(x)
25+
(y, z) <- Map(42 -> 27)
26+
yield (a + y, b + z)
27+
```
28+
29+
- **Before (3.7):** A synthetic tuple-producing `map` was inserted; that step could make `Map` select a generic `map` overload and become an `Iterable` (e.g. `List`)
30+
- **In 3.8:** That synthetic step is removed, so the conversion no longer happens and a different `map`/`flatMap` path can be selected.
31+
32+
The previous runtime behaviour can be achived by explicitly converting first `Map` to `Iterable` type or by compilation with `-source:3.7` settings.
33+
34+
The new warning highlights code where this migration risk exists.
35+
36+
## Notable changes
37+
38+
- Support `:dep ...` to add library dependencies in the Scala REPL [#24131](https://github.com/scala/scala3/pull/24131)
39+
40+
- Upgrade to Scala.js 1.20.2 [#24898](https://github.com/scala/scala3/pull/24898)
41+
42+
- Bump Scala CLI to v1.12.2 (was v1.11.0) [#25217](https://github.com/scala/scala3/pull/25217):
43+
New aliases for RC and nightly Scala versions.
44+
See the Scala CLI release notes for additional details:
45+
[v1.12.0](https://github.com/VirtusLab/scala-cli/releases/tag/v1.12.0),
46+
[v1.12.1](https://github.com/VirtusLab/scala-cli/releases/tag/v1.12.1) and
47+
[v1.12.2](https://github.com/VirtusLab/scala-cli/releases/tag/v1.12.2)
48+
49+
For the complete list of changes and contributor credits, see the [release notes on GitHub](https://github.com/scala/scala3/releases/tag/3.8.2).

0 commit comments

Comments
 (0)