Skip to content

Commit bfccdfa

Browse files
Merge pull request #12699 from dotty-staging/3.0.0-rc1-blog
Add 3.0.1-RC1 blog article
2 parents a82af21 + a151ea8 commit bfccdfa

File tree

1 file changed

+168
-0
lines changed

1 file changed

+168
-0
lines changed
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
---
2+
layout: blog-page
3+
title: Scala 3.0.1-RC1 – further stabilising the compiler
4+
author: Anatolii Kmetiuk
5+
authorImg: /images/anatolii.png
6+
date: 2021-06-07
7+
---
8+
9+
Hello! We are happy to announce Scala 3.0.1-RC1 – the first release candidate in the post-3.0.0 era. With this release, we continue the work on making the compiler even more stable.
10+
11+
<!--more-->
12+
13+
# Experimental language features policy
14+
Research and experimentation has always been an integral part of the Scala community's culture. That's what made Scala the language it is right now. Like many things in engineering, however, it's a part of a trade-off between experimentation and stability. Experimenting is fun and insightful, but when stakes on your project are high, stability becomes a priority.
15+
16+
Therefore, to ensure wide adoption of the language and its reliability in wide range of applications, we need to balance the two. We would like to have the room for trying new things out – but while doing so, we would like to keep in mind an ordinary Scala user who may not necessarily be interested in the bleeding edge and who would like their Scala dependencies and code to simply work. In the post-3.0.0 era, we must prioritize stability.
17+
18+
With this release, we are introducing a restriction on [features marked as experimental](https://dotty.epfl.ch/api/scala/language$$experimental$.html). Now, it is not possible to use them from stable or `RC` releases. If you would like to experiment with them, you need to use a `NIGHTLY` version of the compiler. Nightlies are published every 24 hours, and you can find them on [Maven](https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/).
19+
20+
The spirit of this policy is to make sure that effectively, no library published for Scala 3 contain experimental features. This way, what is experimental can be easily changed and is not subject to the guarantees of the wider language. And, most importantly, the changes to such features would not affect the community *in practice* – the guarantee not achievable if we just announced the policy without implementing a mechanism to enforce it.
21+
22+
Having said that, we still encourage people to play with the experimental features from the `NIGHTLY` compier versions and discuss their findings. Without the curious and adventurous part of the community playing with the new features, there is no way of knowing what they are good for, and no way to decide whether they should be dropped or promoted to a stable feature.
23+
24+
More about this change you can read in the PR [#12102](https://github.com/lampepfl/dotty/pull/12102).
25+
26+
# Kind-projector work
27+
This release also brings extra features for the [Kind Projector](https://docs.scala-lang.org/scala3/guides/migration/plugin-kind-projector.html) migration support. First, PR [#12378](https://github.com/lampepfl/dotty/pull/12378) allows `_` as type lambda placeholder. Second, PR [#12341](https://github.com/lampepfl/dotty/pull/12341) brings support for the variance annotations on the placeholder. This work enhances the ability to cross-compile Scala 2 code that uses the Kind Projector plugin to Scala 3.
28+
29+
# Improved error reporting
30+
Down the error reporting lane, match type reduction errors were improved. When using a match type, it may or may not reduce to one of its cases. If it doesn't match type is used as specified, e.g. if `M[T]` is a match type and it didn't reduce for `M[Int]`, `M[Int]` will be used. This behavior, however, is frequently not what you want: there is a lot of cases where you would expect a match type to reduce but it doesn't. In such cases, it would be nice to have some diagnostic regarding why it didn't reduce. PR [#12053](https://github.com/lampepfl/dotty/pull/12053/) adds just such a diagnostic. E.g. the following code:
31+
32+
```scala
33+
trait A
34+
trait B
35+
type M[X] = X match
36+
case A => Int
37+
case B => String
38+
val x: String = ??? : M[B] // error
39+
```
40+
41+
will report the following error:
42+
43+
```
44+
6 |val x: String = ??? : M[B] // error
45+
| ^^^^^^^^^^
46+
| Found: M[B]
47+
| Required: String
48+
|
49+
| Note: a match type could not be fully reduced:
50+
|
51+
| trying to reduce M[B]
52+
| failed since selector B
53+
| does not match case A => Int
54+
| and cannot be shown to be disjoint from it either.
55+
| Therefore, reduction cannot advance to the remaining case
56+
|
57+
| case B => String
58+
```
59+
60+
# Scaladoc
61+
We have updated the [documentation](http://dotty.epfl.ch/docs/usage/scaladoc/index.html) for Scaladoc making it easier for you to get started. Also, PR [#11582](https://github.com/lampepfl/dotty/pull/11582) has added the snippet compiler to ensure the snippets in your scaladoc documentation comments aren't broken. You can read more about this feature on the [mailing list](https://contributors.scala-lang.org/t/snippet-validation-in-scaladoc-for-scala-3/4976).
62+
63+
# Metaprogramming
64+
A lot of metaprogramming work was focused on improving the performance. Some of the notable PRs include:
65+
66+
- Cache quote unpickling [#12242](https://github.com/lampepfl/dotty/pull/12242)
67+
- Avoid pickled tasty for some captured quote reference [#12248](https://github.com/lampepfl/dotty/pull/12248)
68+
- Improve quote matcher performance [#12418](https://github.com/lampepfl/dotty/pull/12418)
69+
- Port scala.quoted.runtime.impl.QuoteMatcher [#12402](https://github.com/lampepfl/dotty/pull/12402)
70+
71+
72+
# Issue fixing
73+
Otherwise, we are making an effort to reduce our issue tracker. Among others, the following are some of the PRs dedicated to issue fixing:
74+
75+
- IArray.toArray: Deprecate broken method [#12598](https://github.com/lampepfl/dotty/pull/12598)
76+
- Fix comparison of dependent function types [#12214](https://github.com/lampepfl/dotty/pull/12214)
77+
- Make translucentSuperType handle match types [#12153](https://github.com/lampepfl/dotty/pull/12153)
78+
- Harden Type Inference [#12560](https://github.com/lampepfl/dotty/pull/12560)
79+
- Reject references to self in super constructor calls [#12567](https://github.com/lampepfl/dotty/pull/12567)
80+
- Provide mirror support after inlining [#12062](https://github.com/lampepfl/dotty/pull/12062)
81+
- Allow export paths to see imports [#12134](https://github.com/lampepfl/dotty/pull/12134)
82+
- Streamline given syntax [#12107](https://github.com/lampepfl/dotty/pull/12107)
83+
- Export constructor proxies [#12311](https://github.com/lampepfl/dotty/pull/12311)
84+
- Identify package and nested package object in isSubPrefix [#12297](https://github.com/lampepfl/dotty/pull/12297)
85+
- Treat Refinements more like AndTypes [#12317](https://github.com/lampepfl/dotty/pull/12317)
86+
- Fix [#9871](https://github.com/lampepfl/dotty/pull/9871): use toNestedPairs in provablyDisjoint [#10560](https://github.com/lampepfl/dotty/pull/10560)
87+
88+
89+
# Contributors
90+
Thank you to all the contributors who made this release possible 🎉
91+
92+
According to `git shortlog -sn --no-merges 3.0.0-RC2..3.0.1-RC1`† these are:
93+
94+
```
95+
121 Martin Odersky
96+
111 Liu Fengyun
97+
98 Nicolas Stucki
98+
29 Guillaume Martres
99+
24 Phil
100+
20 Olivier Blanvillain
101+
14 Tom Grigg
102+
14 Adrien Piquerez
103+
13 Natsu Kagami
104+
12 Andrzej Ratajczak
105+
10 odersky
106+
10 Aleksander Boruch-Gruszecki
107+
9 Anatolii Kmetiuk
108+
8 Jamie Thompson
109+
6 Maxime Kjaer
110+
5 Som Snytt
111+
3 Filip Zybała
112+
3 Krzysztof Romanowski
113+
3 Kai
114+
3 Fengyun Liu
115+
3 noti0na1
116+
3 Phil Walker
117+
2 Johannes Rudolph
118+
2 soronpo
119+
2 tanishiking
120+
2 Adam Warski
121+
2 Kacper Korban
122+
2 Raphael Jolly
123+
2 Sébastien Doeraene
124+
1 xuwei-k
125+
1 Alexander Ioffe
126+
1 David Barri
127+
1 Devon Stewart
128+
1 Dmitrii Naumenko
129+
1 Ivan Kurchenko
130+
1 Jakub Kozłowski
131+
1 Jonas Ackermann
132+
1 Kevin Lee
133+
1 Martin
134+
1 Michał Pałka
135+
1 Miles Sabin
136+
1 Oron Port
137+
1 Paweł Marks
138+
1 Ruslan Shevchenko
139+
1 Seth Tisue
140+
1 Vadim Chelyshov
141+
1 nogurenn
142+
1 nurekata
143+
```
144+
145+
†: Note that we measure against `3.0.0-RC2` and not `3.0.0` because we stabilized on `3.0.0-RC2`. Only critical bug fixes found their way into `3.0.0-RC3` and further, while the majority of changes ended up in `3.0.1-RC1`.
146+
147+
## Library authors: Join our community build
148+
149+
Scala 3 now has a set of widely-used community libraries that are built against every nightly Scala 3 snapshot.
150+
Join our [community build](https://github.com/lampepfl/dotty/tree/master/community-build)
151+
to make sure that our regression suite includes your library.
152+
153+
[Scastie]: https://scastie.scala-lang.org/?target=dotty
154+
155+
[@odersky]: https://github.com/odersky
156+
[@DarkDimius]: https://github.com/DarkDimius
157+
[@smarter]: https://github.com/smarter
158+
[@felixmulder]: https://github.com/felixmulder
159+
[@nicolasstucki]: https://github.com/nicolasstucki
160+
[@liufengyun]: https://github.com/liufengyun
161+
[@OlivierBlanvillain]: https://github.com/OlivierBlanvillain
162+
[@biboudis]: https://github.com/biboudis
163+
[@allanrenucci]: https://github.com/allanrenucci
164+
[@Blaisorblade]: https://github.com/Blaisorblade
165+
[@Duhemm]: https://github.com/Duhemm
166+
[@AleksanderBG]: https://github.com/AleksanderBG
167+
[@milessabin]: https://github.com/milessabin
168+
[@anatoliykmetyuk]: https://github.com/anatoliykmetyuk

0 commit comments

Comments
 (0)