From fff43fe14835eb2c2ef25bd5ed60157f66c27c8e Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Tue, 11 Nov 2025 09:32:53 -0500 Subject: [PATCH 1/8] [chore] Add Scala 3.7.4 to API docs (#3229) --- _config.yml | 2 +- api/all.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 4739a1d24..b6319f112 100644 --- a/_config.yml +++ b/_config.yml @@ -17,7 +17,7 @@ keywords: scala-version: 2.13.17 scala-212-version: 2.12.20 -scala-3-version: 3.7.3 +scala-3-version: 3.7.4 collections: style: diff --git a/api/all.md b/api/all.md index b5dfde2f0..1df572a82 100644 --- a/api/all.md +++ b/api/all.md @@ -64,6 +64,8 @@ https://scala-ci.typesafe.com/artifactory/scala-integration/org/scala-lang/ ## Previous releases +* Scala 3.7.3 + * [Library API](https://www.scala-lang.org/api/3.7.3/) * Scala 3.7.2 * [Library API](https://www.scala-lang.org/api/3.7.2/) * Scala 3.7.1 From 9e069c855368634cecd5d9a556f80280ba08dd6c Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 12 Nov 2025 10:57:07 -0600 Subject: [PATCH 2/8] Merge pull request #3230 from SethTisue/jdk-compat-updates various updates to JDK compat guide --- _overviews/jdk-compatibility/overview.md | 66 ++++++++++++++---------- 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/_overviews/jdk-compatibility/overview.md b/_overviews/jdk-compatibility/overview.md index 2ffebe457..77a17691d 100644 --- a/_overviews/jdk-compatibility/overview.md +++ b/_overviews/jdk-compatibility/overview.md @@ -4,21 +4,46 @@ title: JDK Compatibility permalink: /overviews/jdk-compatibility/overview.html --- -Scala's primary platform is the Java Virtual Machine (JVM). (Other supported platforms: [Scala.js](https://www.scala-js.org/), [Scala Native](https://scala-native.org/).) +Scala's primary platform is the Java Virtual Machine (JVM). Other supported platforms are [Scala.js](https://www.scala-js.org/) and [Scala Native](https://scala-native.org/). Sometimes new JVM and JDK (Java Development Kit) versions require us to update Scala to remain compatible. -## Scala compatibility table +## Scala 3 compatibility -Minimum Scala versions: +Scala 3 versions from 3.3 LTS through Scala 3.7 support JDK 8 and above. -| JDK | 3 | 3 LTS | 2.13 | 2.12 | 2.11 | -|:-----------:|:--------:|:--------:|:---------:|:---------:|:----------:| -| 25 (LTS) | 3.7.1 | 3.3.6 | 2.13.17 | 2.12.21* | | -| 21 (LTS) | 3.4.0 | 3.3.1 | 2.13.11 | 2.12.18 | | -| 17 (LTS) | 3.0.0 | 3.3.0 | 2.13.6 | 2.12.15 | | -| 11 (LTS) | 3.0.0 | 3.3.0 | 2.13.0 | 2.12.4 | 2.11.12 | -| 8 (LTS) | 3.0.0 | 3.3.0 | 2.13.0 | 2.12.0 | 2.11.0 | +As per [this blog post](https://www.scala-lang.org/news/next-scala-lts-jdk.html), +Scala 3.8 will have a new minimum JDK version of 17. + +The next Scala 3 LTS release will be Scala 3.9. + +Minimum Scala 3 versions for each JDK: + +| JDK | 3.8* | 3.4+ | 3.3 LTS | +|:-----------:|:------:|:--------:|:--------:| +| 25 (LTS) | 3.8.0* | 3.7.1 | 3.3.6 | +| 21 (LTS) | 3.8.0* | 3.4.0 | 3.3.1 | +| 17 (LTS) | 3.8.0* | 3.4.0 | 3.3.0 | +| 11 (LTS) | | 3.4.0 | 3.3.0 | +| 8 (LTS) | | 3.4.0 | 3.3.0 | + +\* = forthcoming; support available in [nightly builds](https://docs.scala-lang.org/overviews/core/nightlies.html) + +Even when a version combination isn't listed as supported, most features might still work. + +Using the latest patch version of your chosen Scala version line is always recommended. + +## Scala 2 compatibility + +Minimum Scala 2 versions for each JDK: + +| JDK | 2.13 | 2.12 | +|:-----------:|:---------:|:---------:| +| 25 (LTS) | 2.13.17 | 2.12.21* | +| 21 (LTS) | 2.13.11 | 2.12.18 | +| 17 (LTS) | 2.13.6 | 2.12.15 | +| 11 (LTS) | 2.13.0 | 2.12.4 | +| 8 (LTS) | 2.13.0 | 2.12.0 | \* = forthcoming; support available in [nightly builds](https://docs.scala-lang.org/overviews/core/nightlies.html) @@ -34,7 +59,7 @@ Minimum working versions: | JDK | scala-cli | sbt | mill | |:-----------:|:-----------:|:---------:|:-----------| -| 25 (LTS) | forthcoming | 1.9.0 | 1.0.0 | +| 25 (LTS) | 1.10.0 | 1.9.0 | 1.0.0 | | 21 (LTS) | 1.0.0 | 1.9.0 | 0.11.5 | | 17 (LTS) | 1.0.0 | 1.6.0 | 0.7.0 | | 11 (LTS) | 1.0.0 | 1.1.0 | 0.1.5 | @@ -50,11 +75,11 @@ Using a different build tool, such as Gradle or Maven? We invite pull requests a ## Running versus compiling -JDK 8, 11, 17, 21, and 25 are all reasonable choices both for *compiling* and *running* Scala code. +JDK 17, 21, and 25 are all good choices both for *compiling* and *running* Scala code. -Since the JVM is normally backwards compatible, it is usually safe to use a newer JVM for *running* your code than the one it was compiled on, especially if you are not using JVM features designated "experimental" or "unsafe". +JDK 8 and 11 are also possible choices. As of 2025, these versions remain in use at some shops, but usage has declined greatly and many projects are dropping support. If you compile on JDK 17+ but want to allow your users to stay on 8, use `--release 8` to avoid using APIs and features that don't exist in 8. Another option is to use a newer JDK for your daily work but do release builds on JDK 8. -JDK 8 remains in use at some shops (as of 2023), but usage is declining and some projects are dropping support. If you compile on JDK 11+ but want to allow your users to stay on 8, additional care is needed to avoid using APIs and features that don't exist in 8. (For this reason, some Scala developers use a newer JDK for their daily work but do release builds on JDK 8.) +Since the JVM is normally backwards compatible, it is usually safe to use a newer JVM for *running* your code than the one it was compiled on, especially if you are not using JVM features designated "experimental" or "unsafe". As per [this blog post](https://www.scala-lang.org/news/next-scala-lts-jdk.html), Scala 3.8 will have a new minimum JDK version of 17. @@ -74,15 +99,13 @@ In almost every case, you're free to use the JDK and JVM of your choice. JDK 8 users typically use the Oracle JDK or some flavor of OpenJDK. -Most JDK 11+ users are using OpenJDK, or GraalVM which runs in the context of OpenJDK. GraalVM performs well on the Scala benchmarks, and it benefits from GraalVM runtime and runs faster too. - OpenJDK comes in various flavors, offered by different providers. We typically build and test Scala using [Temurin](https://adoptium.net) or [Zulu](https://www.azul.com/downloads/), but the differences are unlikely to matter to most users. ## JDK 11 compatibility notes The Scala test suite and Scala community build are green on JDK 11. -In general, Scala works on JDK 11+, including GraalVM, but may not take special advantage of features that were added after JDK 8. +In general, Scala works on JDK 11+, but may not take special advantage of features that were added after JDK 8. For example, the Scala compiler does not enforce the restrictions of the Java Platform Module System, which means that code that typechecks may incur linkage errors at runtime. Scala 2.13.x will eventually provide [rudimentary support](https://github.com/scala/scala/pull/7218) for this (perhaps only in nightlies built on JDK 11). @@ -132,8 +155,6 @@ For information on timing of the forthcoming release, see: * https://contributors.scala-lang.org/t/scala-2-12-21-release-planning/6753 - - For possible Scala 3 issues, see the [area:jdk](https://github.com/scala/scala3/labels/area%3Ajdk) and [compat:java](https://github.com/scala/scala3/labels/compat%3Ajava) labels in [the Scala 3 issue tracker](https://github.com/scala/scala3/issues). For possible Scala 2 issues, see the [jdk11](https://github.com/scala/bug/labels/jdk11), [jdk17](https://github.com/scala/bug/labels/jdk17), [jdk21](https://github.com/scala/bug/labels/jdk21), and [jdk25](https://github.com/scala/bug/labels/jdk25) labels in [the Scala 2 bug tracker](https://github.com/scala/bug/issues). @@ -147,10 +168,3 @@ A few sbt plugins are offering support for GraalVM Native Image compilation: - [sbt-native-packager](https://www.scala-sbt.org/sbt-native-packager/formats/graalvm-native-image.html) - [sbt-native-image](https://github.com/scalameta/sbt-native-image) - -## Scala 3 - -At present, both Scala 3.3 LTS and Scala Next support JDK 8, as well as 11 and beyond. - -As per [this blog post](https://www.scala-lang.org/news/next-scala-lts-jdk.html), -Scala 3.8 will have a new minimum JDK version of 17. This can already be tested in Scala 3.8 nightlies. From dd30c9df4db2ab39513287a84c897ffece8052eb Mon Sep 17 00:00:00 2001 From: katayama8000 Date: Tue, 18 Nov 2025 04:31:56 +0900 Subject: [PATCH 3/8] =?UTF-8?q?Rename=20Twitter=20to=20X=EF=BC=88=E6=97=A7?= =?UTF-8?q?Twitter=EF=BC=89=20(#3189)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _ja/getting-started/install-scala.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_ja/getting-started/install-scala.md b/_ja/getting-started/install-scala.md index a85f87263..76695cf17 100644 --- a/_ja/getting-started/install-scala.md +++ b/_ja/getting-started/install-scala.md @@ -178,4 +178,4 @@ IDE の使用に慣れている場合は、IDE から _Main.scala_ のコード 他の Scala ユーザーとすぐに連絡を取りたい場合は、多くのメーリングリストやリアルタイムのチャットルームがあります。これらのリソースのリストや、どこに問い合わせればよいかについては、[コミュニティページ](https://scala-lang.org/community/)をご覧ください。 ### (日本語のみ追記) -Scala について日本語で質問したい場合、Twitterでつぶやくと気づいた人が教えてくれます。 +Scala について日本語で質問したい場合、X(旧Twitter)でつぶやくと気づいた人が教えてくれます。 From 1a0a11ea943f3f6d234a2bf8cb993a1604b1a1ee Mon Sep 17 00:00:00 2001 From: Dimi Racordon Date: Mon, 17 Nov 2025 11:33:14 -0800 Subject: [PATCH 4/8] Summarize results from the SIP committees (#3194) * Summarize results from the SIP committees * Fix typo --- _sips/results/2025-01-24-meeting.md | 7 +++++++ _sips/results/2025-02-21-meeting.md | 13 +++++++++++++ _sips/results/2025-03-21-meeting.md | 10 ++++++++++ _sips/results/2025-04-25-meeting.md | 7 +++++++ _sips/results/2025-05-23-meeting.md | 13 +++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 _sips/results/2025-01-24-meeting.md create mode 100644 _sips/results/2025-02-21-meeting.md create mode 100644 _sips/results/2025-03-21-meeting.md create mode 100644 _sips/results/2025-04-25-meeting.md create mode 100644 _sips/results/2025-05-23-meeting.md diff --git a/_sips/results/2025-01-24-meeting.md b/_sips/results/2025-01-24-meeting.md new file mode 100644 index 000000000..19c6b7cf0 --- /dev/null +++ b/_sips/results/2025-01-24-meeting.md @@ -0,0 +1,7 @@ +--- +layout: sip-meeting-results +title: SIP Meeting Results - 24th January 2025 +partof: results +proposals: [] +--- +SIP-51, SIP-60, SIP-62, SIP-63, SIP-66, SIP-67, SIP-68, and SIP-69 were discussed but no vote was held. diff --git a/_sips/results/2025-02-21-meeting.md b/_sips/results/2025-02-21-meeting.md new file mode 100644 index 000000000..c88390710 --- /dev/null +++ b/_sips/results/2025-02-21-meeting.md @@ -0,0 +1,13 @@ +--- +layout: sip-meeting-results +title: SIP Meeting Results - 21st February 2025 +partof: results +proposals: + - url: https://github.com/scala/improvement-proposals/pull/58 + name: SIP-52 - Binary APIs + result: accepted + - url: https://github.com/scala/improvement-proposals/pull/97 + name: SIP-67 - Strict equality + result: accepted +--- +SIP-62 and SIP-68 were discussed but no vote was held. diff --git a/_sips/results/2025-03-21-meeting.md b/_sips/results/2025-03-21-meeting.md new file mode 100644 index 000000000..f78e0caa8 --- /dev/null +++ b/_sips/results/2025-03-21-meeting.md @@ -0,0 +1,10 @@ +--- +layout: sip-meeting-results +title: SIP Meeting Results - 21st March 2025 +partof: results +proposals: + - url: https://github.com/scala/improvement-proposals/pull/54 + name: SIP-51 - Drop Forwards Binary Compatibility of the Scala 2.13 Standard Library + result: accepted +--- +SIP-36, SIP-49, SIP-51, SIP-52, SIP-55, SIP-57, SIP-59, SIP-61, and SIP-70 were discussed but no vote was held. diff --git a/_sips/results/2025-04-25-meeting.md b/_sips/results/2025-04-25-meeting.md new file mode 100644 index 000000000..c92bbec4f --- /dev/null +++ b/_sips/results/2025-04-25-meeting.md @@ -0,0 +1,7 @@ +--- +layout: sip-meeting-results +title: SIP Meeting Results - 25th April 2025 +partof: results +proposals: [] +--- +SIP-71 was discussed but no vote was held. diff --git a/_sips/results/2025-05-23-meeting.md b/_sips/results/2025-05-23-meeting.md new file mode 100644 index 000000000..aba801a1a --- /dev/null +++ b/_sips/results/2025-05-23-meeting.md @@ -0,0 +1,13 @@ +--- +layout: sip-meeting-results +title: SIP Meeting Results - 21st March 2025 +partof: results +proposals: + - url: https://github.com/scala/improvement-proposals/pull/67 + name: SIP-57 - Replace non-sensical @unchecked annotations + result: accepted + - url: https://github.com/scala/improvement-proposals/pull/109 + name: SIP-71 - Allow fully implicit conversions in Scala 3 with into + result: accepted +--- +No other SIP was discussed. From bb46c9f26a5cd148cb63126c92cf345371e913b9 Mon Sep 17 00:00:00 2001 From: alar Date: Tue, 18 Nov 2025 15:23:39 +0300 Subject: [PATCH 5/8] typo in iterators.md --- _ru/overviews/collections-2.13/iterators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_ru/overviews/collections-2.13/iterators.md b/_ru/overviews/collections-2.13/iterators.md index 3d43d76a8..2c472e918 100644 --- a/_ru/overviews/collections-2.13/iterators.md +++ b/_ru/overviews/collections-2.13/iterators.md @@ -177,7 +177,7 @@ language: ru def zipWithIndex[A](i: Iterator[A]): Iterator[(Int, A)] = Iterator.from(0).zip(i) -### Буферезированные итераторы +### Буферизированные итераторы Иногда вам нужен итератор, который может "заглянуть вперед", чтобы вы могли оценить следующий элемент, который будет возвращен без перемещения позиции. Рассмотрим, например, задачу пропуска впереди идущих пустых строк из итератора, который возвращает последовательность строк. У вас может возникнуть соблазн написать следующее From cec81b38d645202d919f80e315b5f15d20fc882a Mon Sep 17 00:00:00 2001 From: Shahriar Heidrich Date: Tue, 18 Nov 2025 22:26:50 +0100 Subject: [PATCH 6/8] Add generator expr.s to Scala for Python Devs (#3181) --- .../scala3-book/scala-for-python-devs.md | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/_overviews/scala3-book/scala-for-python-devs.md b/_overviews/scala3-book/scala-for-python-devs.md index c62c7f486..ae4a18821 100644 --- a/_overviews/scala3-book/scala-for-python-devs.md +++ b/_overviews/scala3-book/scala-for-python-devs.md @@ -40,7 +40,7 @@ At a high level, Scala shares these *similarities* with Python: - Both have a relatively simple, concise syntax - Both support a [functional style of programming][fp-intro] - Both are object-oriented programming (OOP) languages -- Both have comprehensions: Python has list comprehensions and Scala has `for` comprehensions +- Both have comprehensions: Python has list comprehensions, dict comprehensions and generator expressions and Scala has `for` comprehensions - Both languages have support for lambdas and [higher-order functions][hofs] - Both can be used with [Apache Spark](https://spark.apache.org) for big data processing - Both have a wealth of terrific libraries @@ -693,6 +693,26 @@ Scala also has `match` expressions. +### Lazily evaluated comprehensions: + + + + + + + + + + +
+ from itertools import count +
all_squares = (n**2 for n in count())  # generator expression +
# all_squares: <generator object <genexpr> at ...>
+
+ val allSquares = for n <- LazyList.from(0) yield n * n +
// allSquares: LazyList(<not computed>)
+
+ ### `match` expressions: From 14f494eabe40bb0ef8700da059da627663f0be03 Mon Sep 17 00:00:00 2001 From: Philippus Baalman Date: Wed, 19 Nov 2025 11:48:43 +0100 Subject: [PATCH 7/8] Add missing `case` (#3234) --- _overviews/core/futures.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_overviews/core/futures.md b/_overviews/core/futures.md index 9f01a4371..b092d2117 100644 --- a/_overviews/core/futures.md +++ b/_overviews/core/futures.md @@ -1181,7 +1181,7 @@ object Test extends App { completion match { case Failure(exception) if exception.getCause != null => println(s" caused by ${exception.getCause}") - _ => () + case _ => () } } } catch { From 08cecc93576164b1e8307d0e2c2dd979b6ec9630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Thu, 20 Nov 2025 14:52:29 +0100 Subject: [PATCH 8/8] Update binary-compatibility-for-library-authors.md (#3200) --- ...inary-compatibility-for-library-authors.md | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/_overviews/tutorials/binary-compatibility-for-library-authors.md b/_overviews/tutorials/binary-compatibility-for-library-authors.md index cb5807a06..cdfac174d 100644 --- a/_overviews/tutorials/binary-compatibility-for-library-authors.md +++ b/_overviews/tutorials/binary-compatibility-for-library-authors.md @@ -255,7 +255,6 @@ alice match Later in time, you can amend the original case class definition to, say, add an optional `address` field. You * add a new field `address` and a custom `withAddress` method, * update the public `apply` method in the companion object to initialize all the fields, - * tell MiMa to [ignore](https://github.com/lightbend-labs/mima#filtering-binary-incompatibilities) changes to the class constructor. This step is necessary because MiMa does not yet ignore changes in private class constructor signatures (see [#738](https://github.com/lightbend-labs/mima/issues/738)). {% tabs case_class_compat_4 class=tabs-scala-version %} {% tab 'Scala 2' %} @@ -284,28 +283,6 @@ object Person: {% endtab %} {% endtabs %} -And, in your build definition: - -{% tabs case_class_compat_5 %} -{% tab 'sbt' %} -~~~ scala -import com.typesafe.tools.mima.core._ -mimaBinaryIssueFilters += ProblemFilters.exclude[DirectMissingMethodProblem]("Person.this") -~~~ -{% endtab %} -{% endtabs %} - -Otherwise, MiMa would fail with an error like “method this(java.lang.String,Int)Unit in class Person does not have a correspondent in current version”. - -> Note that an alternative solution, instead of adding a MiMa exclusion filter, consists of adding back the previous -> constructor signatures as secondary constructors: -> ~~~ scala -> case class Person private (name: String, age: Int, address: Option[String]): -> ... -> // Add back the former primary constructor signature -> private[Person] def this(name: String, age: Int) = this(name, age, None) -> ~~~ - The original users can use the case class `Person` as before, all the methods that existed before are present unmodified after this change, thus the compatibility with the existing usage is maintained. The new field `address` can be used as follows: