Skip to content

Commit 46683d0

Browse files
authored
Hotfix 3.3.3 (#19818)
Fixes #19815 contents: - [c5169f0] - fix by @smarter - [1f5a667] - forward and backward compatibility tests (by @bishabosha). Probably, it's overkill, but it's better to be paranoid than sorry. They only take a few seconds. - [df10488] - a copy of the 3.3.2 changelog with annotation about the hotfix. - [e497a42] - version bump. I decided to stay on 3.3.1 as a reference version and version that we check the compatibility against.
2 parents 7c9a142 + 5e0de64 commit 46683d0

File tree

27 files changed

+302
-16
lines changed

27 files changed

+302
-16
lines changed

changelogs/3.3.3.md

+164
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# HOTFIX 3.3.3
2+
3+
This is a hotfix release to [a subtle bug](https://github.com/playframework/playframework/issues/12418) in the TASTy reader managed to survive the Release Candidate (RC) process. The bug caused 3.3.2 to emit TASTy files incompatible with previous releases in the LTS line, namely 3.3.1 and 3.3.0.
4+
5+
Below you can find the original release notes for 3.3.2:
6+
7+
# Highlights of the release
8+
9+
- Improvements to the Coverage (detailed list below)
10+
- Add Stable Presentation Compiler [#17528](https://github.com/lampepfl/dotty/pull/17528)
11+
12+
# Other changes and fixes
13+
14+
## Backend
15+
16+
- Make sure synthetic apply methods are generated in deterministic order [#18210](https://github.com/lampepfl/dotty/pull/18210)
17+
18+
## Coverage
19+
20+
- Only lift inner expressions when lifting repeated `Typed` arguments [#18424](https://github.com/lampepfl/dotty/pull/18424)
21+
- Fix: scoverage statement's line number should be 1-base [#18932](https://github.com/lampepfl/dotty/pull/18932)
22+
- Do not lift applications of context functions [#18498](https://github.com/lampepfl/dotty/pull/18498)
23+
- Don't lift the argument of a `synchronized` block in scoverage [#16941](https://github.com/lampepfl/dotty/pull/16941)
24+
- Fix the issue with coverage inside of a TypeApply [#18420](https://github.com/lampepfl/dotty/pull/18420)
25+
- Coverage: mark case bodies as branches; don't ignore branches with synthetic spans [#18437](https://github.com/lampepfl/dotty/pull/18437)
26+
27+
## Documentation
28+
29+
- Compiler plugin Scaladoc: document phase requirement [#18394](https://github.com/lampepfl/dotty/pull/18394)
30+
31+
## Exports
32+
33+
- Refine override exclude criterion for export forwarders [#17590](https://github.com/lampepfl/dotty/pull/17590)
34+
35+
## Incremental Compilation
36+
37+
- Fix overcompilation due to unstable context bound desugaring [#18280](https://github.com/lampepfl/dotty/pull/18280)
38+
39+
## Inline
40+
41+
- Don't generate a super accessor for an inline method call [#17598](https://github.com/lampepfl/dotty/pull/17598)
42+
43+
## Linting
44+
45+
- Wunused: Only use type treverser for checking refinements in refined type trees [#17929](https://github.com/lampepfl/dotty/pull/17929)
46+
47+
## Parser
48+
49+
- Add examples taken from reference page [#18066](https://github.com/lampepfl/dotty/pull/18066)
50+
- Test for #18345 [#18349](https://github.com/lampepfl/dotty/pull/18349)
51+
52+
## Pattern Matching
53+
54+
- Properly refine type of inlined unapply pattern [#18292](https://github.com/lampepfl/dotty/pull/18292)
55+
56+
## Presentation Compiler
57+
58+
- Bugfix: suggest correct arg name completions for lambda expressions [#18379](https://github.com/lampepfl/dotty/pull/18379)
59+
- Improvement: print better bracket suffix in completion item label [#18380](https://github.com/lampepfl/dotty/pull/18380)
60+
- Fix presentation compiler autoimports, update presentation compiler dependencies [#18264](https://github.com/lampepfl/dotty/pull/18264)
61+
- Update scala3-presentation-compiler to 39e349e [#18296](https://github.com/lampepfl/dotty/pull/18296)
62+
- Update presentation compiler with changes from PR 5287 [#18301](https://github.com/lampepfl/dotty/pull/18301)
63+
- Update presentation compiler to a829a6a [#18347](https://github.com/lampepfl/dotty/pull/18347)
64+
- Bugfix: highlight enum cases correctly [#18362](https://github.com/lampepfl/dotty/pull/18362)
65+
66+
## Quotes
67+
68+
- Do not beta-reduce/eta-expand pattern splices with contextual function types [#18198](https://github.com/lampepfl/dotty/pull/18198)
69+
- XcheckMacro types of Block expression and Apply/TypeApply function [#18242](https://github.com/lampepfl/dotty/pull/18242)
70+
- Fix owner of splices in class statements [#18359](https://github.com/lampepfl/dotty/pull/18359)
71+
- Handle macro dependencies through class of `this` [#18396](https://github.com/lampepfl/dotty/pull/18396)
72+
- Add missing span in `QuoteMatcher` [#18178](https://github.com/lampepfl/dotty/pull/18178)
73+
- Fix stale symbol crashes in some path depended types in macro contexts [#18077](https://github.com/lampepfl/dotty/pull/18077)
74+
- Simplify avoidance of local types of Hole [#17571](https://github.com/lampepfl/dotty/pull/17571)
75+
76+
## Reporting
77+
78+
- Detail "not a constant type" message [#17626](https://github.com/lampepfl/dotty/pull/17626)
79+
- Suggest imports for the expected type of the underlying implicit not found error [#17976](https://github.com/lampepfl/dotty/pull/17976)
80+
- Fix: report correct location on a repeat modifier [#17982](https://github.com/lampepfl/dotty/pull/17982)
81+
- Warn when calling synchronized on AnyVal [#18021](https://github.com/lampepfl/dotty/pull/18021)
82+
- Fix compile error message in wildcard exports [#18189](https://github.com/lampepfl/dotty/pull/18189)
83+
- Improve parameter type inference error messaging [#18190](https://github.com/lampepfl/dotty/pull/18190)
84+
- Don't report warnings in migration when performing rewrites [#15589](https://github.com/lampepfl/dotty/pull/15589)
85+
- Fix crash reporter, units and phases [#17754](https://github.com/lampepfl/dotty/pull/17754)
86+
- Omit more prefixes in non-package module printing [#17758](https://github.com/lampepfl/dotty/pull/17758)
87+
- Fix pretty printer to handle using and erased modifier [#17952](https://github.com/lampepfl/dotty/pull/17952)
88+
- Add -Yprint-tasty compiler flag [#17986](https://github.com/lampepfl/dotty/pull/17986)
89+
- Add actionable item to PatternMatchExhaustivity diagnostic [#18314](https://github.com/lampepfl/dotty/pull/18314)
90+
91+
## Scaladoc
92+
93+
- Fix: -no-link-warnings does not work [#17028](https://github.com/lampepfl/dotty/pull/17028)
94+
- Fix: Validation for API link [#17099](https://github.com/lampepfl/dotty/pull/17099)
95+
- Scaladoc: type rendering fixes and improvements [#17213](https://github.com/lampepfl/dotty/pull/17213)
96+
- Feat: Add a custom icon [#17241](https://github.com/lampepfl/dotty/pull/17241)
97+
- Fix: Correction of the siteRoot path [#17297](https://github.com/lampepfl/dotty/pull/17297)
98+
- Fix: Correct the navigation to anchor [#17910](https://github.com/lampepfl/dotty/pull/17910)
99+
- Fix: Style for wiki syntax [#18079](https://github.com/lampepfl/dotty/pull/18079)
100+
- Fix NoSuchElementException in scaladoc [#18184](https://github.com/lampepfl/dotty/pull/18184)
101+
- Update jsoup dependency of Scaladoc to 7.2 [#19584](https://github.com/lampepfl/dotty/pull/19584)
102+
103+
## SemanticDB
104+
105+
- Check for primary constructor in namePresentInSource [#18325](https://github.com/lampepfl/dotty/pull/18325)
106+
- Add -semanticdb-text compiler option [#18307](https://github.com/lampepfl/dotty/pull/18307)
107+
108+
## Typer
109+
110+
- Fix pattern generation in "ordinal" mirror method [#17570](https://github.com/lampepfl/dotty/pull/17570)
111+
- Fix superType of SuperType [#17574](https://github.com/lampepfl/dotty/pull/17574)
112+
- Avoid crash in erasure when reference cannot be emitted [#18056](https://github.com/lampepfl/dotty/pull/18056)
113+
- Disallow overloading from breaking stable patterns [#18327](https://github.com/lampepfl/dotty/pull/18327)
114+
- Fix widen types before checking an implicit view exists [#18719](https://github.com/lampepfl/dotty/pull/18719)
115+
- Properly handle SAM types with wildcards [#18201](https://github.com/lampepfl/dotty/pull/18201)
116+
- Handle recursion in collectParts [#18214](https://github.com/lampepfl/dotty/pull/18214)
117+
- Allow eta-expansion of inline defs [#18249](https://github.com/lampepfl/dotty/pull/18249)
118+
- Stable names for lambda lifted methods [#18281](https://github.com/lampepfl/dotty/pull/18281)
119+
- Fix expandParam's use of argForParam/isArgPrefixOf. [#19412](https://github.com/lampepfl/dotty/pull/19412)
120+
121+
# Contributors
122+
123+
Thank you to all the contributors who made this release possible 🎉
124+
125+
According to `git shortlog -sn --no-merges 3.3.1..3.3.2` these are:
126+
127+
```
128+
42 Paweł Marks
129+
38 Nicolas Stucki
130+
28 Chris Kipp
131+
15 Sébastien Doeraene
132+
13 Lucas Leblanc
133+
13 Martin Odersky
134+
12 Guillaume Martres
135+
11 Dale Wijnand
136+
10 Jamie Thompson
137+
8 ghostbuster91
138+
6 Florian3k
139+
5 Kacper Korban
140+
4 Jan Chyb
141+
4 Jędrzej Rochala
142+
4 Katarzyna Marek
143+
4 Quentin Bernet
144+
4 Seth Tisue
145+
3 Lucas
146+
3 Matt Bovel
147+
2 Julien Richard-Foy
148+
2 Wojciech Mazur
149+
1 Aleksey Troitskiy
150+
1 Arnout Engelen
151+
1 Bjorn Regnell
152+
1 Eugene Yokota
153+
1 Fabián Heredia Montiel
154+
1 Justin Reardon
155+
1 Kisaragi
156+
1 Martin Kučera
157+
1 Matthew Rooney
158+
1 Matthias Kurz
159+
1 Ondrej Lhotak
160+
1 Rikito Taniguchi
161+
1 Stefan Wachter
162+
1 Yuito Murase
163+
1 rochala
164+
```

compiler/src/dotty/tools/dotc/core/NameKinds.scala

+8-10
Original file line numberDiff line numberDiff line change
@@ -290,18 +290,16 @@ object NameKinds {
290290
*/
291291
val ContextBoundParamName: UniqueNameKind = new UniqueNameKind("evidence$")
292292

293-
/** The name of an inferred contextual function parameter:
294-
*
295-
* val x: A ?=> B = b
296-
*
297-
* becomes:
298-
*
299-
* val x: A ?=> B = (contextual$1: A) ?=> b
300-
*/
301-
val ContextFunctionParamName: UniqueNameKind = new UniqueNameKind("contextual$")
293+
// Reuse an existing NameKind to avoid breaking the tasty readers of Scala 3.3.0 and 3.3.1
294+
// see https://github.com/playframework/playframework/issues/12418
295+
val ContextFunctionParamName: UniqueNameKind = ContextBoundParamName
296+
val CanThrowEvidenceName: UniqueNameKind = ContextBoundParamName
297+
298+
// Generate NameKinds matching the ones used in 3.3.2 so we can unpickle 3.3.2 code.
299+
val ContextFunctionParamName_332: UniqueNameKind = new UniqueNameKind("contextual$")
300+
val CanThrowEvidenceName_332: UniqueNameKind = new UniqueNameKind("canThrow$")
302301

303302
/** Other unique names */
304-
val CanThrowEvidenceName: UniqueNameKind = new UniqueNameKind("canThrow$")
305303
val TempResultName: UniqueNameKind = new UniqueNameKind("ev$")
306304
val DepParamName: UniqueNameKind = new UniqueNameKind("(param)")
307305
val LazyImplicitName: UniqueNameKind = new UniqueNameKind("$_lazy_implicit_$")

project/Build.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ object Build {
8383

8484
val referenceVersion = "3.3.1"
8585

86-
val baseVersion = "3.3.2"
86+
val baseVersion = "3.3.3"
8787

8888
// Versions used by the vscode extension to create a new project
8989
// This should be the latest published releases.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package app
2+
3+
import lib.*
4+
5+
@main def test = println:
6+
given String = "foo"
7+
Wrap.foo[Long]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lazy val lib = project.in(file("lib"))
2+
.settings(
3+
scalaVersion := "3.3.1"
4+
)
5+
6+
lazy val app = project.in(file("app"))
7+
.dependsOn(lib)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package lib
2+
3+
object Wrap:
4+
def foo[T: Numeric]: String ?=> T =
5+
summon[Numeric[T]].fromInt(summon[String].length)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import sbt._
2+
import Keys._
3+
4+
object DottyInjectedPlugin extends AutoPlugin {
5+
override def requires = plugins.JvmPlugin
6+
override def trigger = allRequirements
7+
8+
override val projectSettings = Seq(
9+
scalaVersion := sys.props("plugin.scalaVersion")
10+
)
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
> app/run
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package app
2+
3+
import lib.*
4+
5+
@main def test = println:
6+
given String = "foo"
7+
Wrap.foo[Long]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lazy val lib = project.in(file("lib"))
2+
.settings(
3+
scalaVersion := "3.3.2"
4+
)
5+
6+
lazy val app = project.in(file("app"))
7+
.dependsOn(lib)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package lib
2+
3+
object Wrap:
4+
def foo[T: Numeric]: String ?=> T =
5+
summon[Numeric[T]].fromInt(summon[String].length)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import sbt._
2+
import Keys._
3+
4+
object DottyInjectedPlugin extends AutoPlugin {
5+
override def requires = plugins.JvmPlugin
6+
override def trigger = allRequirements
7+
8+
override val projectSettings = Seq(
9+
scalaVersion := sys.props("plugin.scalaVersion")
10+
)
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
> app/run
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package app
2+
3+
import lib.*
4+
5+
@main def test = println:
6+
given String = "foo"
7+
Wrap.foo[Long]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lazy val lib = project.in(file("lib"))
2+
3+
lazy val app = project.in(file("app"))
4+
.dependsOn(lib)
5+
.settings(
6+
scalaVersion := "3.3.1"
7+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package lib
2+
3+
object Wrap:
4+
def foo[T: Numeric]: String ?=> T =
5+
summon[Numeric[T]].fromInt(summon[String].length)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import sbt._
2+
import Keys._
3+
4+
object DottyInjectedPlugin extends AutoPlugin {
5+
override def requires = plugins.JvmPlugin
6+
override def trigger = allRequirements
7+
8+
override val projectSettings = Seq(
9+
scalaVersion := sys.props("plugin.scalaVersion")
10+
)
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
> app/run
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package app
2+
3+
import lib.*
4+
5+
@main def test = println:
6+
given String = "foo"
7+
Wrap.foo[Long]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lazy val lib = project.in(file("lib"))
2+
3+
lazy val app = project.in(file("app"))
4+
.dependsOn(lib)
5+
.settings(
6+
scalaVersion := "3.3.2"
7+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package lib
2+
3+
object Wrap:
4+
def foo[T: Numeric]: String ?=> T =
5+
summon[Numeric[T]].fromInt(summon[String].length)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import sbt._
2+
import Keys._
3+
4+
object DottyInjectedPlugin extends AutoPlugin {
5+
override def requires = plugins.JvmPlugin
6+
override def trigger = allRequirements
7+
8+
override val projectSettings = Seq(
9+
scalaVersion := sys.props("plugin.scalaVersion")
10+
)
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
> app/run

tests/neg/i11350.check

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
-- [E081] Type Error: tests/neg/i11350.scala:1:39 ----------------------------------------------------------------------
22
1 |class A1[T](action: A1[T] ?=> String = "") // error
33
| ^
4-
| Could not infer type for parameter contextual$1 of anonymous function
4+
| Could not infer type for parameter evidence$1 of anonymous function
55
|
66
| Partially inferred type for the parameter: A1[<?>]
77
|
88
| Expected type for the whole anonymous function: (A1[<?>]) ?=> String
99
-- [E081] Type Error: tests/neg/i11350.scala:2:39 ----------------------------------------------------------------------
1010
2 |class A2[T](action: A1[T] ?=> String = summon[A1[T]]) // error
1111
| ^
12-
| Could not infer type for parameter contextual$2 of anonymous function
12+
| Could not infer type for parameter evidence$2 of anonymous function
1313
|
1414
| Partially inferred type for the parameter: A1[<?>]
1515
|

tests/run-staging/multi-staging.check

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
stage1 code: ((q1: scala.quoted.Quotes) ?=> {
22
val x1: scala.Int = 2
3-
scala.quoted.runtime.Expr.quote[scala.Int](1.+(scala.quoted.runtime.Expr.splice[scala.Int](((contextual$5: scala.quoted.Quotes) ?=> scala.quoted.Expr.apply[scala.Int](x1)(scala.quoted.ToExpr.IntToExpr[scala.Int])(contextual$5))))).apply(using q1)
3+
scala.quoted.runtime.Expr.quote[scala.Int](1.+(scala.quoted.runtime.Expr.splice[scala.Int](((evidence$5: scala.quoted.Quotes) ?=> scala.quoted.Expr.apply[scala.Int](x1)(scala.quoted.ToExpr.IntToExpr[scala.Int])(evidence$5))))).apply(using q1)
44
})
55
3
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
((q: scala.quoted.Quotes) ?=> {
22
val a: scala.quoted.Expr[scala.Int] = scala.quoted.runtime.Expr.quote[scala.Int](4).apply(using q)
3-
((contextual$2: scala.quoted.Quotes) ?=> a).apply(using q)
3+
((evidence$2: scala.quoted.Quotes) ?=> a).apply(using q)
44
})
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
((q: scala.quoted.Quotes) ?=> {
22
val a: scala.quoted.Expr[scala.Int] = scala.quoted.runtime.Expr.quote[scala.Int](4).apply(using q)
3-
((q2: scala.quoted.Quotes) ?=> ((contextual$2: scala.quoted.Quotes) ?=> a).apply(using q2))
3+
((q2: scala.quoted.Quotes) ?=> ((evidence$2: scala.quoted.Quotes) ?=> a).apply(using q2))
44
}.apply(using q))

0 commit comments

Comments
 (0)