Skip to content

Commit 8dace93

Browse files
committed
Merge branch 'release-3.7.2' into language-reference-stable
2 parents 8deaaad + efb6ce7 commit 8dace93

File tree

684 files changed

+11489
-5592
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

684 files changed

+11489
-5592
lines changed

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,33 @@ assignees: ''
99

1010
## Compiler version
1111

12-
If you're not sure what version you're using, run `print scalaVersion` from sbt
13-
(if you're running scalac manually, use `scalac -version` instead).
12+
If you're not sure which version you're using, run `print scalaVersion` from sbt.
13+
(If you're running scalac manually, use `scalac -version` instead.)
14+
15+
If possible, check if your issue appears in the nightly version of the compiler! For example, in Scala CLI (the `scala`/`scala-cli` runner script), you can use `//> using scala 3.nightly` (or `-S 3.nightly` from the command line) to grab the latest one.
1416

1517
## Minimized code
1618

1719
<!--
1820
This code should be self contained, compilable (with possible failures) and as small as possible.
1921
20-
Ideally, we should be able to just copy this code in a file and run `scalac` (and maybe `scala`) to reproduce the issue.
22+
Ideally, we should be able to just copy this code to a file and run `scalac` (and maybe `scala`) to reproduce the issue.
23+
24+
If the code has external dependencies, please provide the Scala CLI directives (or SBT/other build tool configuration) that describe them.
25+
Also note that it's easier and faster for the maintenance team to address issues minimised to reproduce bugs without external dependencies.
26+
27+
It's most convenient to also include `using` directives for the Scala version that demonstrates the problem,
28+
any compiler command-line options, as well as dependencies. An example is provided.
29+
30+
It's also fine to paste the transcript of a REPL session. Note that some bugs may be specific to the REPL.
2131
-->
2232

23-
```Scala
24-
println("hello, world")
33+
```scala
34+
//> using scala 3.7.0
35+
//> using options -Wall -Werror
36+
//> using dep com.outr::scribe:3.16.1
37+
38+
@main def test = println("hello, world")
2539
```
2640

2741
## Output

.github/workflows/cla.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
jobs:
77
check:
88
runs-on: ubuntu-latest
9+
if: github.event.pull_request.user.login != 'dependabot'
910
steps:
1011
- name: Verify CLA
1112
uses: scala/cla-checker@v1

.github/workflows/lts-backport.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818
- uses: coursier/cache-action@v6
19-
- uses: VirtusLab/scala-cli-setup@v1.7.1
19+
- uses: VirtusLab/scala-cli-setup@v1.8.4
2020
- run: scala-cli ./project/scripts/addToBackportingProject.scala -- ${{ github.sha }}
2121
env:
2222
GRAPHQL_API_TOKEN: ${{ secrets.GRAPHQL_API_TOKEN }}

.github/workflows/publish-sdkman.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ on:
2424
CONSUMER-KEY:
2525
required: true
2626
CONSUMER-TOKEN:
27-
required: true
27+
required: true
2828

2929
env:
3030
RELEASE-URL: 'https://github.com/scala/scala3/releases/download/${{ inputs.version }}'
@@ -54,7 +54,7 @@ jobs:
5454
VERSION : ${{ inputs.version }}
5555
URL : '${{ env.RELEASE-URL }}/${{ matrix.archive }}'
5656
PLATFORM : ${{ matrix.platform }}
57-
57+
5858
default:
5959
runs-on: ubuntu-latest
6060
needs: publish

changelogs/3.7.2-RC1.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Highlights of the release
2+
3+
- Implement applied constructor types [#22543](https://github.com/scala/scala3/pull/22543)
4+
- Bump Scala CLI to v1.8.1 (was v1.8.0) [#23334](https://github.com/scala/scala3/pull/23334)
5+
- Support for URLs in using file directives
6+
- See full [Scala CLI changelog](https://github.com/VirtusLab/scala-cli/releases/tag/v1.8.1)
7+
8+
# Other changes and fixes
9+
10+
## Documentation
11+
12+
- Mark `AnyRef::eq` and `AnyRef::ne` as infix instead of special casing when emitting the warning [#23252](https://github.com/scala/scala3/pull/23252)
13+
- Mark `eq` and `ne` in Predef as `infix` [#23255](https://github.com/scala/scala3/pull/23255)
14+
15+
## Experimental: Capture Checking
16+
17+
- Allow caps in result types of functions to be mapped to reaches [#23275](https://github.com/scala/scala3/pull/23275)
18+
- Adapt types according to read-only status [#23332](https://github.com/scala/scala3/pull/23332)
19+
- Rename `mut` to `update` [#23335](https://github.com/scala/scala3/pull/23335)
20+
- Change retains annotation from using term arguments to using type arguments [#22909](https://github.com/scala/scala3/pull/22909)
21+
- New Syntax for Capture Variables and Explicit Capture Polymorphism v3 [#23063](https://github.com/scala/scala3/pull/23063)
22+
- Fix #23223: Add handling for classes deriving from Capability during Setup [#23248](https://github.com/scala/scala3/pull/23248)
23+
- Copy `@use` and `@consume` annotations to parameter types [#23324](https://github.com/scala/scala3/pull/23324)
24+
- Fix handling of `@use` and `@consume` in class parameters [#23342](https://github.com/scala/scala3/pull/23342)
25+
- Some usability improvements relating to errors [#23370](https://github.com/scala/scala3/pull/23370)
26+
- Loosen the "does not match previously inferred" criterion [#23067](https://github.com/scala/scala3/pull/23067)
27+
- Use level checking for Fresh instances [#23101](https://github.com/scala/scala3/pull/23101)
28+
- Ensure all capture variables carry the attachment [#23162](https://github.com/scala/scala3/pull/23162)
29+
- Cache ResultCaps [#23198](https://github.com/scala/scala3/pull/23198)
30+
- Move separation checking to `-source:3.8` [#23249](https://github.com/scala/scala3/pull/23249)
31+
- Refactorings for CC error reporting [#23260](https://github.com/scala/scala3/pull/23260)
32+
- Standardize on log-based undo [#23357](https://github.com/scala/scala3/pull/23357)
33+
- Flag nonsensical capturing types with pure parents as errors [#23367](https://github.com/scala/scala3/pull/23367)
34+
35+
## Experimental: Erased Definitions
36+
37+
- Erased fields are not nullable [#23311](https://github.com/scala/scala3/pull/23311)
38+
39+
## Experimental: Explicit Nulls
40+
41+
- Relax comparison between Null and reference types in explicit nulls [#23308](https://github.com/scala/scala3/pull/23308)
42+
- Warn about unnecessary uses of .nn [#23327](https://github.com/scala/scala3/pull/23327)
43+
44+
## Experimental: Global Initialization
45+
46+
- Modified abstract domain in global initialization checker [#23138](https://github.com/scala/scala3/pull/23138)
47+
48+
## Experimental: Into Modifier
49+
50+
- Change `into` scheme to be fully type-based [#23014](https://github.com/scala/scala3/pull/23014)
51+
52+
## Implicits
53+
54+
- Try extensions for arguments with type mismatch error [#23212](https://github.com/scala/scala3/pull/23212)
55+
56+
## Linting
57+
58+
- Improve checking LHS of Assign [#22977](https://github.com/scala/scala3/pull/22977)
59+
- Remove premature caching of lookups for unused lint [#22982](https://github.com/scala/scala3/pull/22982)
60+
- Enclosing package p.q not visible as q [#23069](https://github.com/scala/scala3/pull/23069)
61+
- Mention extension in unused param warning [#23132](https://github.com/scala/scala3/pull/23132)
62+
- Improve Unit ascription escape hatch [#23147](https://github.com/scala/scala3/pull/23147)
63+
- Dealias for unused param check [#23256](https://github.com/scala/scala3/pull/23256)
64+
- Take inferred or explicit refinement result for unused check [#23325](https://github.com/scala/scala3/pull/23325)
65+
- Nowarn receiver of extension taking params [#23351](https://github.com/scala/scala3/pull/23351)
66+
- Improved edit span for import [#23083](https://github.com/scala/scala3/pull/23083)
67+
68+
## Parser
69+
70+
- Fix incorrect warning with -no-indent [#23216](https://github.com/scala/scala3/pull/23216)
71+
- Patvar: adjust caret in error message [#23115](https://github.com/scala/scala3/pull/23115)
72+
- Disallow empty parameter clauses in `extension` definition [#23143](https://github.com/scala/scala3/pull/23143)
73+
74+
## Pattern Matching
75+
76+
- Improve GADT reasoning for pattern alternatives [#23205](https://github.com/scala/scala3/pull/23205)
77+
78+
## Pickling
79+
80+
- Try to handle SkolemTypes in SingletonTypeTree during pickling [#23236](https://github.com/scala/scala3/pull/23236)
81+
- Avoid creating constructors where not warranted [#23178](https://github.com/scala/scala3/pull/23178)
82+
83+
## Presentation Compiler
84+
85+
- Use untpd.Tree instead of tpd.Tree for SelectionRangeProvider [#22702](https://github.com/scala/scala3/pull/22702)
86+
- Fix completion mode filtering + optimize scopeCompletions [#23172](https://github.com/scala/scala3/pull/23172)
87+
- Handle multiple params lists in for infer type [#23197](https://github.com/scala/scala3/pull/23197)
88+
- Add jpath to VirtualFile (for pc) [#23203](https://github.com/scala/scala3/pull/23203)
89+
- Add selection ranges for more names [#23257](https://github.com/scala/scala3/pull/23257)
90+
- Add inlay hints for by-name parameters [#23283](https://github.com/scala/scala3/pull/23283)
91+
- Implement code action 'convert to named lambda parameters' [#22799](https://github.com/scala/scala3/pull/22799)
92+
- Buffix: Make PC actions work for re-exported symbols [#22722](https://github.com/scala/scala3/pull/22722)
93+
- Bugfix: Fix enumeration issues when Value is imported [#23124](https://github.com/scala/scala3/pull/23124)
94+
- Bugfix: Check in the collector for empty arrays [#23341](https://github.com/scala/scala3/pull/23341)
95+
- Bugfix: Don't check scope members if not needed [#23384](https://github.com/scala/scala3/pull/23384)
96+
- Improvement: Don't dealias named tuples for type hints [#23013](https://github.com/scala/scala3/pull/23013)
97+
- Improvement: Simplify match types when possible [#23146](https://github.com/scala/scala3/pull/23146)
98+
- Improvement: Improve efficiency of completions [#23355](https://github.com/scala/scala3/pull/23355)
99+
- Improvement: Cache compilation on . and don't add CURSOR [#23356](https://github.com/scala/scala3/pull/23356)
100+
101+
## Private Options
102+
103+
- Add an `-Yimplicit-to-given` flag for rewrites to easily test changes in the ecosystem [#22580](https://github.com/scala/scala3/pull/22580)
104+
- Add `scala.language.2.13` [#23219](https://github.com/scala/scala3/pull/23219)
105+
106+
## Rewrites
107+
108+
- Remove empty parentheses when rewriting implicits to givens [#23339](https://github.com/scala/scala3/pull/23339)
109+
110+
## Quotes
111+
112+
- Preserve implicits in Quotes context [#23263](https://github.com/scala/scala3/pull/23263)
113+
- Don't StackOverflow when printing RecursiveType structure. [#22859](https://github.com/scala/scala3/pull/22859)
114+
115+
## Reflection
116+
117+
- Forbid `StringConstant(null)` [#23064](https://github.com/scala/scala3/pull/23064)
118+
119+
## Reporting
120+
121+
- Fix incorrect warning on type ascription for backquoted identifiers [#23088](https://github.com/scala/scala3/pull/23088)
122+
- Improve position of deprecation [#23052](https://github.com/scala/scala3/pull/23052)
123+
- Have a better error message when context bounds are not allowed [#23190](https://github.com/scala/scala3/pull/23190)
124+
- Avoid false warning when synthesising deferred givens [#23087](https://github.com/scala/scala3/pull/23087)
125+
- Fix insufficient number width allocated when using `-print-lines` [#23336](https://github.com/scala/scala3/pull/23336)
126+
127+
## SemanticDB
128+
129+
- Fix SemantiDB production of method signature with shadowed parameters [#23161](https://github.com/scala/scala3/pull/23161)
130+
- Check if symbol exists before calling methods on it [#23376](https://github.com/scala/scala3/pull/23376)
131+
132+
## Settings
133+
134+
- Filter allowed source versions by import and by settings [#23215](https://github.com/scala/scala3/pull/23215)
135+
136+
## Tooling
137+
138+
- Suggest to add using as a code action [#23079](https://github.com/scala/scala3/pull/23079)
139+
140+
## Transform
141+
142+
- Warn trivial recursion with module prefix [#23278](https://github.com/scala/scala3/pull/23278)
143+
- Partial function synthesis changesOwner of selector [#23337](https://github.com/scala/scala3/pull/23337)
144+
145+
## Typer
146+
147+
- Compare TypeVar and TypeParamRef in mergeRefinedOrApplied [#23045](https://github.com/scala/scala3/pull/23045)
148+
- Revert recent changes to opaque type proxy generation [#23059](https://github.com/scala/scala3/pull/23059)
149+
- Only keep denotation for methods in IntegrateMap [#23226](https://github.com/scala/scala3/pull/23226)
150+
- Tighten condition when to do SAM type conversion [#23246](https://github.com/scala/scala3/pull/23246)
151+
- Revert "Make overload pruning based on result types less aggressive (#21744)" in main [#23331](https://github.com/scala/scala3/pull/23331)
152+
- Tweak parameter dependency test when typing applications [#23346](https://github.com/scala/scala3/pull/23346)
153+
- Ensure pt span exists in implicitParams migration [#23372](https://github.com/scala/scala3/pull/23372)
154+
- Check for error before checking members of product type in getUnapplySelectors [#23358](https://github.com/scala/scala3/pull/23358)
155+
- Synthesise value of `this.type` in `ValueOf` [#23094](https://github.com/scala/scala3/pull/23094)
156+
- Hide constructor proxies at PostTyper [#23269](https://github.com/scala/scala3/pull/23269)

changelogs/3.7.2-RC2.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Backported chnages
2+
3+
- Backport "Bump Scala CLI to v1.8.4 (was v1.8.1)" to 3.7.2 [#23547](https://github.com/scala/scala3/pull/23547)
4+
- Backport "Use result of lambda type of implicit in CheckUnused" to 3.7.2 [#23545](https://github.com/scala/scala3/pull/23545)
5+
- Backport "Check path of module prefix for tailrec" to 3.7.2 [#23544](https://github.com/scala/scala3/pull/23544)
6+
- Backport "Fix stale top level synthetic package object being used in later runs" to 3.7.2 [#23543](https://github.com/scala/scala3/pull/23543)
7+
- Backport "Improve completions when a lot of exports are present" to 3.7.2 [#23542](https://github.com/scala/scala3/pull/23542)
8+
- Backport "Fix regressions in asSeenFrom introduced in 3.7" [#23442](https://github.com/scala/scala3/pull/23442)
9+
10+
11+
# Contributors
12+
13+
Thank you to all the contributors who made this release possible 🎉
14+
15+
According to `git shortlog -sn --no-merges 3.7.2-RC1..3.7.2-RC2` these are:
16+
17+
```
18+
11 Wojciech Mazur
19+
1 Guillaume Martres
20+
1 Tomasz Godzik
21+
```

0 commit comments

Comments
 (0)