Scala 3.6 release thread

Scala 3.6.0 and 3.6.1 artifacts are now ready for tests of the new upcoming minor release.

Please, don’t upgrade to either 3.6.0 or 3.6.1.

Why no 3.6.0-RC1?
During the release of 3.6.0-RC1 error occurred that led to publishing its artifacts under version 3.6.0, and was followed by hotfix release 3.6.1 to mitigate damage that might have been introduced to tools using the latest version of Scala from Maven repositories.
You can read more about this accident in a dedicated blog post - Postmortem of Scala 3.6.0 | The Scala Programming Language

Which version of 3.6 should I use for tests?
As postmortem explains currently both 3.6.0 and 3.6.1 versions are available. The only difference between the 2 is usage of stable TASTy version in 3.6.1. Both of these versions should be treated as 3.6.0-RC1. We recommend using 3.6.1 for testing.

Which version would be stable?
We would prepare bug fixes in 3.6.2-RC versions and would release stable 3.6.2 no earlier than 18th November.
If no bug fixes would be required 3.6.1 might be announced as stable. However, it is a very unlikely scenario - it would be the first occurrence of a new minor release without the need for a subsequent RC version).

What’s new in Scala 3.6

  • Named tuples as now a standard (non-experimental) feature
  • New givens syntax
  • Clause Interleaving is now a stable feature
  • New experimental feature enabling improved for-comprehensions
  • … and many more

You can read more and see example in a draft announcement for Scala 3.6.0 (prepared before the incident)

The full changelog can be found in the GitHub release Release 3.6.1 · scala/scala3 · GitHub

Please, don’t upgrade to either 3.6.0 or 3.6.1.

6 Likes

Hooray for clause interleaving !

2 Likes

OK, so we wait for 3.6.2. I assume these two (3.6.0 and 3.6.1) won’t be available on SDKMAN right?

I was confused about this. Then I read the announcement, it says:

Note: It is important not to confuse changes under SIP-64 with the experimental modularity improvements available under -language:experimental.modularity and -source:future. These changes are still being developed in the experimental phase and would require SIP committee acceptance before stabilisation.

OK that makes sense… but this means given syntax will likely change again? Am I understanding this right?

Currently, both of these versions are treated as RC, so no, these won’t be published to SDKMAN. We’ve never published RCs to either SDKMAN, Chocolatey or any other package manager

1 Like

One of the key changes under -language:experimental.modularity is access to the type Self instead of viral type parameter. The exact semantics or syntax may or may not change in the future (thus it’s experimental feature). It’s still too early to decide when it can be stabilized - it would require a SIP proposal and approval. I would not expect it being standarized before next 2-3 minor versions.

SIP-64 - Improve Syntax for Context Bounds and Givens focued mostly on improving syntax. Most of the changes could be treated as improved desugering that could have been obtained using other techniques. Most of these changes are inline with preperation for -language:experimental.modularity and are unlikely to change.
However, there is 1 change releated to SIP-64 that has not made it until 3.6.0 cutoff - Context Bounds for Polymorphic Functions by KacperFKorban · Pull Request #21643 · scala/scala3 · GitHub, it is to be decided if it would be included in 3.7 or 3.6.2 (unlikely)

1 Like

OK, that clears things up; I thought they would conflict, or experimental-modularity would override SIP-64 changes.

I thought that because of the as keyword I see in the SIP-64 changes mentioned here, which was discussed in the pre-SIP discussion, and I was under the impression that as was decided against (I was involved in that discussion)… But I think I’m confusing as for context bounds with as for named givens. :smiley:

One more confusion is that this (which I thought was more “up-to-date”) seems different than this. But now I understand that they are related but separate (one is a follow-up to the other).

I’m still confused, I’ll probably wait until 3.7 for the dust to settle to fully understand it.

Well, except for coursier. You can use any RC version with coursier.

Scala 3.6.2-RC1 is now available for testing.
Scala 3.6.2 would become the first official (stable) release of the Scala 3.6 series
Version 3.6.0 (a broken release) and 3.6.1 (a hotfix release) should never be used.

We’re planning the Scala 3.6.2 stable release for next week (no earlier than November 26th) unless critical issues would be found.
It would be followed by the Scala 3.6.3-RC1 release shortly after.

See the GH release notes for a full changelog since 3.5.2 (previous stable version) or expand the section below to see what has changed since 3.6.0/3.6.1

Highlights of the release

  • Refine the bounds of the Tuple.Filter type lambda predicate … #21286

  • Add an infix shorthand for Tuple.{Append, Concat} #21288

  • Move NonEmptyTuple members into Tuple #21291

  • Context Bounds for Polymorphic Functions #21643

  • Add .msi artifacts to release assets #21834

  • Migration rewrites for infix arguments interpreted as named tuples #21949

Other changes and fixes

Match Types

  • Fix #21295: Restrict provablyDisjoint with Nothings in invariant type params. #21891

Parser

  • Handle old given syntax where identifier and type are seperated by new line #21957

  • Fix: Allow as as an infix type in non context bound types #21849

Pattern Matching

  • Optimise SpaceEngine.signature #21791

Typer

  • Allow autotupling if fn’s param is a type param #21741

  • Fix extending protected nested java classes #21857

Named Tuples

  • Warn when named tuples resemble assignments #21823
3 Likes

Sorry if this has been discussed before already:
When do you expect the next Scala LTS release?
Is there a post/discussion already which you can link me to?
Thanks!

We’re preparing Scala 3.3.5 LTS which would contain all the backportable improvements introduced until Scala 3.5.2. You can expect RC1 in upcoming 1-2 weeks, and a stable release by the end of this year.

In the future, you can expect a new LTS patch release for every new minor release of Next.
We’d aim to have at least 2 patch releases per minor version of Scala Next. We’d like to use these time to battle test improvements before they’re backported to LTS to reduce the probability of regressions. It means you should expect 3.3.6 LTS after Scala 3.6.4 (3.6.2 is treated as 3.6.0 because of a broken release) is released, and 3.3.7 LTS after 3.7.2 is released.
With our current development cycle taking 6-8 weeks per version, a new LTS patch should be available every ~4 months (unless we’d be required to publish critical bugfixes sooner)
This pace of LTS releases seems also to be mostly aligned with the frequency of Scala 2 releases.

1 Like

Sorry, I meant the next “major” LTS after 3.3 (3.7?, 3.8?)
Like do you plan to have a new LTS “line” in 2025?
Thanks

According to the chart here, yes. Not sure which version it would be though.

We’ve started some initial planning for the next LTS series that might be released somewhere in Q4 2025, so it might be Scala 3.9. More information will follow in a dedicated blog post when we’d have some more concrete information.

2 Likes

Thanks!