Skip to content

Commit c75b81d

Browse files
committed
Merge branch 'release-3.3.1' into language-reference-stable
2 parents e008975 + 721e7c8 commit c75b81d

File tree

1,192 files changed

+42973
-8444
lines changed

Some content is hidden

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

1,192 files changed

+42973
-8444
lines changed

.github/PULL_REQUEST_TEMPLATE/fix-issue.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ assignees: ''
66

77
---
88

9-
<!--
10-
TODO first sign the CLA
9+
<!--
10+
TODO first sign the CLA
1111
https://www.lightbend.com/contribute/cla/scala
1212
-->
1313

1414
## Fix #XYZ
1515

16-
<!-- TODO description of the change -->
16+
<!-- TODO description of the change -->
1717

1818

1919
<!-- Ideally should have a called "Fix #XYZ: A SHORT FIX DESCRIPTION" -->

.github/PULL_REQUEST_TEMPLATE/other-pr.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ assignees: ''
66

77
---
88

9-
<!--
10-
TODO first sign the CLA
9+
<!--
10+
TODO first sign the CLA
1111
https://www.lightbend.com/contribute/cla/scala
1212
-->
1313

1414
## Description
1515

16-
<!-- TODO description of the change -->
16+
<!-- TODO description of the change -->
1717

1818

1919
<!-- Ideally should have a single commit -->

.github/workflows/ci.yaml

+11-39
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ on:
1414
## - both (tags or tags-ignore) and (branches or branches-ignore),
1515
## - or neither of them.
1616
## But it's important to not have only one or the other.
17+
tags:
18+
- '*'
19+
branches-ignore:
20+
- 'gh-readonly-queue/**'
1721
pull_request:
22+
merge_group:
1823
schedule:
1924
- cron: '0 3 * * *' # Every day at 3 AM
2025
workflow_dispatch:
@@ -97,6 +102,7 @@ jobs:
97102
- ${{ github.workspace }}/../../cache/general:/root/.cache
98103
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
99104
|| github.event_name == 'push'
105+
|| github.event_name == 'merge_group'
100106
|| (
101107
github.event_name == 'pull_request'
102108
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -142,6 +148,7 @@ jobs:
142148
github.event_name == 'push'
143149
&& github.ref != 'refs/heads/main'
144150
)
151+
|| github.event_name == 'merge_group'
145152
|| (
146153
github.event_name == 'pull_request'
147154
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -218,6 +225,7 @@ jobs:
218225
- ${{ github.workspace }}/../../cache/general:/root/.cache
219226
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
220227
|| github.event_name == 'push'
228+
|| github.event_name == 'merge_group'
221229
|| (
222230
github.event_name == 'pull_request'
223231
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -258,6 +266,7 @@ jobs:
258266
- ${{ github.workspace }}/../../cache/general:/root/.cache
259267
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
260268
|| github.event_name == 'push'
269+
|| github.event_name == 'merge_group'
261270
|| (
262271
github.event_name == 'pull_request'
263272
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -306,6 +315,7 @@ jobs:
306315
- ${{ github.workspace }}/../../cache/general:/root/.cache
307316
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
308317
|| github.event_name == 'push'
318+
|| github.event_name == 'merge_group'
309319
|| (
310320
github.event_name == 'pull_request'
311321
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -354,6 +364,7 @@ jobs:
354364
- ${{ github.workspace }}/../../cache/general:/root/.cache
355365
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
356366
|| github.event_name == 'push'
367+
|| github.event_name == 'merge_group'
357368
|| (
358369
github.event_name == 'pull_request'
359370
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -585,45 +596,6 @@ jobs:
585596
external_repository: lampepfl/dotty-website
586597
publish_branch: gh-pages
587598

588-
nightly_unmanaged_community_build:
589-
# Self-hosted runner is used only for getting current build version
590-
runs-on: [self-hosted, Linux]
591-
container:
592-
image: lampepfl/dotty:2021-03-22
593-
options: --cpu-shares 4096
594-
volumes:
595-
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
596-
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
597-
- ${{ github.workspace }}/../../cache/general:/root/.cache
598-
needs: [publish_nightly]
599-
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'lampepfl/dotty'"
600-
env:
601-
NIGHTLYBUILD: yes
602-
steps:
603-
- name: Reset existing repo
604-
run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
605-
606-
- name: Checkout cleanup script
607-
uses: actions/checkout@v3
608-
609-
- name: Cleanup
610-
run: .github/workflows/cleanup.sh
611-
612-
- name: Git Checkout
613-
uses: actions/checkout@v3
614-
615-
- name: Add SBT proxy repositories
616-
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true
617-
618-
- name: Get version string for this build
619-
run: |
620-
ver=$(./project/scripts/sbt "print scala3-compiler-bootstrapped/version" | tail -n1)
621-
echo "This build version: $ver"
622-
echo "THISBUILD_VERSION=$ver" >> $GITHUB_ENV
623-
# Steps above are copy-pasted from publish_nightly, needed only to resolve THISBUILD_VERSION
624-
- name: Trigger unmanaged community build
625-
run: .github/workflows/scripts/triggerUnmanagedCommunityBuild.sh "${{ secrets.BUILD_TOKEN }}" "$THISBUILD_VERSION"
626-
627599
publish_release:
628600
permissions:
629601
contents: write # for actions/create-release to create a release

.github/workflows/cla.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
push:
77
branches:
88
- 'language-reference-stable'
9+
merge_group:
910
permissions:
1011
contents: write
1112
pull-requests: write

.github/workflows/releases.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
options: --cpu-shares 4096
1414

1515
env:
16-
SDKMAN_KEY: ${{ secrets.SDKMAN_KEY }}
16+
SDKMAN_KEY: ${{ secrets.SDKMAN_KEY }}
1717
SDKMAN_TOKEN: ${{ secrets.SDKMAN_TOKEN }}
18-
18+
1919
steps:
2020
- name: Reset existing repo
2121
run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true

.github/workflows/scaladoc.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
push:
55
branches-ignore:
66
- 'language-reference-stable'
7+
- 'gh-readonly-queue/**'
78
pull_request:
89
branches-ignore:
910
- 'language-reference-stable'
11+
merge_group:
1012
permissions:
1113
contents: read
1214

@@ -15,7 +17,8 @@ jobs:
1517
env:
1618
AZURE_STORAGE_SAS_TOKEN: ${{ secrets.AZURE_STORAGE_SAS_TOKEN }}
1719
runs-on: ubuntu-latest
18-
if: "( github.event_name == 'pull_request'
20+
if: "github.event_name == 'merge_group'
21+
|| ( github.event_name == 'pull_request'
1922
&& !contains(github.event.pull_request.body, '[skip ci]')
2023
&& !contains(github.event.pull_request.body, '[skip docs]')
2124
)

.github/workflows/scripts/publish-sdkman.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
set -u
1111

12-
# latest stable dotty version
12+
# latest stable dotty version
1313
DOTTY_VERSION=$(curl -s https://api.github.com/repos/lampepfl/dotty/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
1414
DOTTY_URL="https://github.com/lampepfl/dotty/releases/download/$DOTTY_VERSION/scala3-$DOTTY_VERSION.zip"
1515

16-
# checking if dotty version is available
16+
# checking if dotty version is available
1717
if ! curl --output /dev/null --silent --head --fail "$DOTTY_URL"; then
1818
echo "URL doesn't exist: $DOTTY_URL"
1919
exit 1

.github/workflows/scripts/triggerUnmanagedCommunityBuild.sh

-37
This file was deleted.

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,5 @@ compiler/test-coursier/run/*.jar
9393
# docs related
9494
contributors.js
9595
content-contributors.css
96+
docs/_spec/_site/
97+
docs/_spec/.jekyll-metadata

CONTRIBUTING.md

+4-59
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,5 @@
1-
# Dotty Developer Guidelines
1+
# Contributing to Dotty
22

3-
These guidelines are meant to be a living document that should be changed and adapted as needed. We encourage changes that make it easier to achieve our goals in an efficient way.
4-
5-
## General Workflow
6-
7-
This is the process for committing code to the Scala project. There are of course exceptions to these rules, for example minor changes to comments and documentation, fixing a broken build etc.
8-
9-
1. Make sure you have signed the [Scala CLA](https://www.lightbend.com/contribute/cla/scala), if not, sign it.
10-
2. Before starting to work on a feature or a fix, it's good practice to ensure that:
11-
1. There is a ticket for your work in the project's [issue tracker](https://github.com/lampepfl/dotty/issues);
12-
2. The ticket has been discussed and prioritized by the team.
13-
3. You should always perform your work in its own Git branch. The branch should be given a descriptive name that explains its intent. Some teams also like adding the ticket number and/or the [GitHub](http://github.com) user ID to the branch name, these details is up to each of the individual teams. (See below for more details on branch naming.)
14-
4. When the feature or fix is completed you should open a [Pull Request](https://help.github.com/articles/using-pull-requests) on GitHub.
15-
5. The Pull Request should be reviewed by other maintainers (as many as feasible/practical). Note that a reviewer can also be an outside contributor—members of Typesafe or VirtusLab and independent contributors are encouraged to participate in the review process. It is not a closed process. Please try to avoid conflict of interest—the spirit of the review process is to evenly distribute the understanding of our code base across its maintainers as well as to load balance quality assurance. Assigning a review to a "sure win" reviewer is not a good long-term solution.
16-
6. After the review, you should resolve issues brought up by the reviewers as needed (pushing a new commit to address reviewers' comments), iterating until the reviewers give their thumbs up, the "LGTM" (acronym for "Looks Good To Me").
17-
7. Once the code has passed review the Pull Request can be merged into the distribution.
18-
19-
## Pull Request Requirements
20-
21-
In order for a Pull Request to be considered, it has to meet these requirements:
22-
23-
1. Live up to the current code standard:
24-
- Not violate [DRY](https://www.oreilly.com/library/view/97-things-every/9780596809515/ch30.html).
25-
- [Boy Scout Rule](https://www.oreilly.com/library/view/97-things-every/9780596809515/ch08.html) should be applied.
26-
2. Tests are of paramount importance.
27-
3. The code must be well documented in the project's standard documentation format (see the ‘Documentation’ section below).
28-
29-
If *all* of these requirements are not met then the code should **not** be merged into the distribution, and need not even be reviewed.
30-
31-
## Documentation
32-
33-
All contributed code should come accompanied by documentation. Pull requests containing undocumented code will not be accepted. Both user-facing Scaladoc comments, as well as committer-facing internal documentation (i.e. essential design decisions that other maintainers should know about should be placed inline with line comments `//`) should be accompanying all contributed code where possible.
34-
35-
36-
## Work In Progress
37-
38-
It is ok to work on a public feature branch in the GitHub repository. Something that can sometimes be useful for early feedback etc. If so, then it is preferable to name the branch accordingly. This can be done by either prefixing the name with ``wip-`` as in ‘Work In Progress’, or use hierarchical names like ``wip/..``, ``feature/..`` or ``topic/..``. Either way is fine as long as it is clear that it is work in progress and not ready for merge. This work can temporarily have a lower standard. However, to be merged into master it will have to go through the regular process outlined above, with Pull Request, review etc..
39-
40-
Also, to facilitate both well-formed commits and working together, the ``wip`` and ``feature``/``topic`` identifiers also have special meaning. Any branch labeled with ``wip`` is considered “git-unstable” and may be rebased and have its history rewritten. Any branch with ``feature``/``topic`` in the name is considered “stable” enough for others to depend on when a group is working on a feature.
41-
42-
## Creating Commits And Writing Commit Messages
43-
44-
Follow these guidelines when creating public commits and writing commit messages.
45-
46-
1. If your work spans multiple local commits (for example; if you do safe point commits while working in a feature branch or work in a branch for long time doing merges/rebases etc.) then please do not commit it all but rewrite the history by squashing the commits into one large commit which is accompanied by a detailed commit message for (as discussed in the following sections). For more info, see the article: [Git Workflow](http://sandofsky.com/blog/git-workflow.html). Additionally, every commit should be able to be used in isolation—that is, each commit must build and pass all tests.
47-
2. The first line should be a descriptive sentence about what the commit is doing. It should be possible to fully understand what the commit does by just reading this single line. It is **not ok** to only list the ticket number, type "minor fix" or similar. If the commit has a corresponding ticket, include a reference to the ticket number, prefixed with "Closes #", at the beginning of the first line followed by the title of the ticket, assuming that it aptly and concisely summarizes the commit in a single line. If the commit is a small fix, then you are done. If not, go to 3.
48-
3. Following the single line description (ideally no more than 70 characters long) should be a blank line followed by an enumerated list with the details of the commit.
49-
4. Add keywords for your commit (depending on the degree of automation we reach, the list may change over time):
50-
* ``Review by @githubuser`` - will notify the reviewer via GitHub. Everyone is encouraged to give feedback, however. (Remember that @-mentions will result in notifications also when pushing to a WIP branch, so please only include this in your commit message when you're ready for your pull request to be reviewed. Alternatively, you may request a review in the pull request's description.)
51-
* ``Fix/Fixing/Fixes/Close/Closing/Refs #ticket`` - if you want to mark the ticket as fixed in the issue tracker (Assembla understands this).
52-
* ``backport to _branch name_`` - if the fix needs to be cherry-picked to another branch (like 2.9.x, 2.10.x, etc)
53-
54-
Example:
55-
56-
Closes #2 Fixes the build
57-
58-
- Details 1
59-
- Details 2
60-
- Details 3
3+
Firstly, thanks for being willing to contribute to Dotty! Head on over the
4+
[Scala 3 Contributing
5+
Guide](https://dotty.epfl.ch/docs/contributing/index.html), which should have all the info you're looking for.

MAINTENANCE.md

+20-12
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,36 @@ At the end of their supervision period, the supervisor reports to the team durin
6161

6262
The following is the list of all the principal areas of the compiler and the core team members who are responsible for their maintenance:
6363

64+
### Compiler
6465
- Parser: @odersky
6566
- Typer: @odersky, @smarter, (@dwijnand)
6667
- Erasure: @smarter, @odersky
6768
- Enums: @bishabosha
69+
- Derivation & Mirrors: @bishabosha, (@dwijnand)
6870
- Export: @bishabosha, @odersky
6971
- Pattern Matching: @dwijnand, (@liufengyun), @sjrd
7072
- Inline: @nicolasstucki, @odersky
71-
- Metaprogramming (Quotes, Reflect, Staging): @nicolasstucki, @aherlihy
72-
- Match types: @OlivierBlanvillain, @dwijnand
73-
- GADT: @abgruszecki, @dwijnand
74-
- Scaladoc: @KacperFKorban, @BarkingBad, @pikinier20
75-
- Initialization checker: @olhotak, @liufengyun, @anatoliykmetyuk
73+
- Metaprogramming (Quotes, Reflect, Staging): @nicolasstucki, @jchyb
74+
- Match types: @sjrd, @dwijnand, @Decel
75+
- GADT: @dwijnand, @Linyxus
76+
- Initialization checker: @olhotak, @liufengyun
7677
- Safe nulls: @noti0na1, @olhotak
78+
- Lazy vals: @szymon-rd, @sjrd
7779
- tailrec: @sjrd, @mbovel
7880
- JS backend: @sjrd
79-
- forward compat (-scala-release): @prolativ, @Kordyjan, (@nicolasstucki)
80-
- Benchmarks: @anatoliykmetyuk, @mbovel
81-
- REPL: @dwijnand, @anatoliykmetyuk, @prolativ
81+
- JVM backend: @sjrd
82+
- Java-compat: @smarter
83+
84+
### Tooling
85+
- REPL: @dwijnand, @prolativ
86+
- Scaladoc: @Florian3k
87+
- SemanticDB: @tanishiking
88+
- Coverage: @TheElectronWill
89+
- Linting (especially unused warnings) / Reporting UX: @szymon-rd
90+
91+
### Infrastructure
8292
- CI: @anatoliykmetyuk
8393
- Community Build: @anatoliykmetyuk
94+
- Open Community Build: @WojciechMazur
8495
- Vulpix: @dwijnand, @prolativ
85-
- JVM backend: @Kordyjan, (@sjrd)
86-
- Derivation & Mirrors: @bishabosha, (@dwijnand)
87-
- Linting (especially unused warnings) / Reporting UX: VirtusLab TBD?
88-
- Java-compat: @Kordyjan
96+
- Benchmarks: @mbovel

bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccess.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class InitializedAccess {
1818

1919
@Setup
2020
def prepare: Unit = {
21-
holder = new LazyHolder
21+
holder = new LazyHolder
2222
holder.value
2323
}
2424

bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessAny.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class InitializedAccessAny {
1818

1919
@Setup
2020
def prepare: Unit = {
21-
holder = new LazyAnyHolder
21+
holder = new LazyAnyHolder
2222
holder.value
2323
}
2424

bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessGeneric.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class InitializedAccessGeneric {
1818

1919
@Setup
2020
def prepare: Unit = {
21-
holder = new LazyGenericHolder[String]("foo")
21+
holder = new LazyGenericHolder[String]("foo")
2222
holder.value
2323
}
2424

bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessString.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class InitializedAccessString {
1818

1919
@Setup
2020
def prepare: Unit = {
21-
holder = new LazyStringHolder
21+
holder = new LazyStringHolder
2222
holder.value
2323
}
2424

0 commit comments

Comments
 (0)