-
Notifications
You must be signed in to change notification settings - Fork 325
First draft of 3.1.1 blogpost #1324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5fde4cb
First draft of 3.1.1 blogpost
Kordyjan f6e5e8e
Small corrections in the 3.1.1 blogpost
Kordyjan 3abb4ff
Fix typos in Scala-3.1.1 post
Kordyjan 12fa60c
Add more info about 3.1.1 features
Kordyjan 13d3e9a
Add buildtool warning about -Yscala-release flag
Kordyjan fee7b7d
Remove stuff repeated every release
Kordyjan a110f94
Add links and contributors list
Kordyjan 7861363
Editorial changes to 3.1.1 announcement
Kordyjan e497672
Update blog/_posts/2022-01-17-scala-3.1.1-released.md
Kordyjan 3b131e2
Apply suggestions from code review
Kordyjan 89fe1ba
Apply suggestions from code review
Kordyjan fa10f0b
Make things ready
Kordyjan d2117c8
Add links to spec
Kordyjan 9029082
Update the dates
Kordyjan 1d172b1
Clarify `-Yscala-release` and dependencies
Kordyjan a484d57
Correct some grammar
Kordyjan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Scala 3.1.1 | ||
start: 1 February 2022 | ||
layout: downloadpage | ||
release_version: 3.1.1 | ||
release_date: "February 1, 2022" | ||
permalink: /download/3.1.1.html | ||
license: <a href="https://www.scala-lang.org/license/">Apache License, Version 2.0</a> | ||
--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
--- | ||
layout: blog-detail | ||
post-type: blog | ||
by: Paweł Marks, VirtusLab | ||
title: Scala 3.1.1 and forward compatibility news | ||
--- | ||
|
||
Hello from the Scala 3 team! We are back with a new release of the Scala compiler and some exciting news about improvements in forward compatibility. | ||
|
||
## Improvements in Scala 3.1.1 | ||
|
||
Scala 3.1.1 is a patch release focused on bug fixes. Although there are no new additions to the language, you can still spot some noticeable improvements: | ||
|
||
- You can use `using` clauses to introduce subtyping relations between types in the function body. | ||
|
||
Now, code like the following should compile. Any value of type `A` can be used where a value of type `B` is expected as long as a given instance of `A <:< B` is in scope: | ||
|
||
```scala | ||
def example[A, B](a: A)(using A <:< B) = | ||
val b: B = a | ||
??? | ||
``` | ||
|
||
To learn more see [PR #13662](https://github.com/lampepfl/dotty/pull/13662) and [related issue](https://github.com/lampepfl/dotty/issues/12955). | ||
- Mirrors can be correctly summoned for hierarchical sum types compiled by Scala 3.0.x. It is now safe to derive a type class for a type dependency that was compiled with a pre-3.1.0 compiler. ([PR #14100](https://github.com/lampepfl/dotty/pull/14100)). | ||
- Dual Scala 2/3 macros can be now declared in non-experimental scopes ([PR #13795](https://github.com/lampepfl/dotty/pull/13795)). | ||
- Scaladoc documentation has an improved UI. | ||
|
||
For a comprehensive list of fixes, take a look at [the full changelog on GitHub](https://github.com/lampepfl/dotty/releases/tag/3.1.1). | ||
|
||
## 3.1.2-RC1 and forward compatibility improvements | ||
|
||
Alongside 3.1.1 we have released the first RC version of the next patch release of the compiler. 3.1.2-RC1 contains further fixes, but most importantly it is our first step in improving forward compatibility in Scala. | ||
|
||
Scala 3 has excellent backward compatibility guarantees between the minor versions. Right now, that means that code compiled with Scala 3.1 can depend on libraries published with 3.0 without any problems. The opposite, hovewer, is not true. Code compiled with 3.0 is not able to read dependencies compiled with 3.1. After the recent release of Scala 3.1.0, we can see that libraries should be really cautious with updating the compiler version, as it forces a bump on every user of that library. We do not want library authors to be stuck on old versions of the compiler as that would mean that they are locked out of many bugfixes, or we would need to spend enormous effort on backporting every bugfix to all past versioning lines. | ||
|
||
Our current plan to mitigate those difficulties is described in [the contributors discussion](https://contributors.scala-lang.org/t/improving-scala-3-forward-compatibility/5298), where you are free to leave your feedback. We already have implemented the first and most important part of the solution and have it ready for public testing. Beginning with Scala 3.1.2-RC1 the compiler is able to generate outputs that can be consumed by its older versions. To enable that, you need to specify the minimal targeted minor language version by using the experimental `-Yscala-release` flag. | ||
|
||
We expect that in the future authors will use the newest available version of the compiler with `-Yscala-release` set to the lowest language version that support all features they need. This way they will be able to benefit from all the bugfixes without restricting their potential audience. | ||
|
||
So, for example, compiling your library using Scala 3.1.2-RC2 with `-Yscala-release:3.0` flag, you make it possible for people still using Scala 3.0 to depend on your library. This has some limitations, especially your library cannot have any dependencies compiled with `-Yscala-release` version higher than 3.0. You also won't be able to use any symbol added to the standard library after 3.0. They are marked in the code and in the documentation by the `@since` annotation that was also added in this version. | ||
|
||
One important note is that the `-Yscala-release` flag is experimental and not yet available in any stable release of the compiler. It means the build tools, such as SBT or Mill, are not yet aware of its existence. Of course, you can declare usage of the flag in your build file, and the compiler will respect it. However, there may still be some hiccups, like generated artifacts depending on the incorrect version of the stdlib. We will do our best to help fix those minor issues before the stable release of 3.1.2. | ||
|
||
Detailed description of the new flag can be found in [the reference page for the binary comaptibility](https://docs.scala-lang.org/scala3/reference/language-versions/binary-compatibility.html). | ||
|
||
If you are interested in other changes brought by 3.1.2-RC1, there is, as always, [a changelog on GitHub](https://github.com/lampepfl/dotty/releases/tag/3.1.2-RC1). | ||
|
||
## Contributors | ||
|
||
Thank you to all the contributors who made this release possible. | ||
|
||
According to `git shortlog -sn --no-merges 3.1.0..3.1.1` these are: | ||
|
||
``` | ||
50 Fengyun Liu | ||
43 Martin Odersky | ||
26 Olivier Blanvillain | ||
24 Kacper Korban | ||
21 Filip Zybała | ||
18 Dale Wijnand | ||
18 Nicolas Stucki | ||
17 Phil | ||
13 Andrzej Ratajczak | ||
10 Guillaume Martres | ||
10 noti0na1 | ||
8 Paweł Marks | ||
7 Jamie Thompson | ||
5 soronpo | ||
5 Tom Grigg | ||
3 Yichen Xu | ||
3 Dmitrii Naumenko | ||
3 ghostbuster91 | ||
3 Julien Richard-Foy | ||
2 Stéphane Micheloud | ||
2 bjornregnell | ||
2 Vadim Chelyshov | ||
1 ysthakur | ||
1 Daniel Esik | ||
1 EnzeXing | ||
1 Jasper Moeys | ||
1 Katja Goltsova | ||
1 Matthieu Bovel | ||
1 Ondrej Lhotak | ||
1 Oron Port | ||
1 Rikito Taniguchi | ||
1 Seth Tisue | ||
1 Som Snytt | ||
1 Sébastien Doeraene | ||
1 Tomasz Godzik | ||
1 oronpo | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.