Skip to content

Commit 32f27f5

Browse files
authored
Merge branch 'main' into language-reference-stable
2 parents ea65ae0 + d6c643c commit 32f27f5

File tree

2,212 files changed

+220855
-14115
lines changed

Some content is hidden

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

2,212 files changed

+220855
-14115
lines changed

.github/PULL_REQUEST_TEMPLATE/fix-issue.md

Lines changed: 3 additions & 3 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 22 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,24 @@ name: Dotty
22

33
on:
44
push:
5+
## Be careful if you add or remove something here! Quoting from
6+
## <https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore>:
7+
##
8+
## > If you define only tags/tags-ignore or only branches/branches-ignore, the
9+
## > workflow won't run for events affecting the undefined Git ref. If you
10+
## > define neither tags/tags-ignore or branches/branches-ignore, the workflow
11+
## > will run for events affecting either branches or tags.
12+
##
13+
## We want the CI to run on both branches and tags, so we should either have:
14+
## - both (tags or tags-ignore) and (branches or branches-ignore),
15+
## - or neither of them.
16+
## But it's important to not have only one or the other.
517
tags:
6-
- '**'
18+
- '*'
19+
branches-ignore:
20+
- 'gh-readonly-queue/**'
721
pull_request:
22+
merge_group:
823
schedule:
924
- cron: '0 3 * * *' # Every day at 3 AM
1025
workflow_dispatch:
@@ -87,6 +102,7 @@ jobs:
87102
- ${{ github.workspace }}/../../cache/general:/root/.cache
88103
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
89104
|| github.event_name == 'push'
105+
|| github.event_name == 'merge_group'
90106
|| (
91107
github.event_name == 'pull_request'
92108
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -132,6 +148,7 @@ jobs:
132148
github.event_name == 'push'
133149
&& github.ref != 'refs/heads/main'
134150
)
151+
|| github.event_name == 'merge_group'
135152
|| (
136153
github.event_name == 'pull_request'
137154
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -208,6 +225,7 @@ jobs:
208225
- ${{ github.workspace }}/../../cache/general:/root/.cache
209226
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
210227
|| github.event_name == 'push'
228+
|| github.event_name == 'merge_group'
211229
|| (
212230
github.event_name == 'pull_request'
213231
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -248,6 +266,7 @@ jobs:
248266
- ${{ github.workspace }}/../../cache/general:/root/.cache
249267
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
250268
|| github.event_name == 'push'
269+
|| github.event_name == 'merge_group'
251270
|| (
252271
github.event_name == 'pull_request'
253272
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -296,6 +315,7 @@ jobs:
296315
- ${{ github.workspace }}/../../cache/general:/root/.cache
297316
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
298317
|| github.event_name == 'push'
318+
|| github.event_name == 'merge_group'
299319
|| (
300320
github.event_name == 'pull_request'
301321
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -344,6 +364,7 @@ jobs:
344364
- ${{ github.workspace }}/../../cache/general:/root/.cache
345365
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
346366
|| github.event_name == 'push'
367+
|| github.event_name == 'merge_group'
347368
|| (
348369
github.event_name == 'pull_request'
349370
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -575,45 +596,6 @@ jobs:
575596
external_repository: lampepfl/dotty-website
576597
publish_branch: gh-pages
577598

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

.github/workflows/cla.yml

Lines changed: 1 addition & 0 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 0 additions & 37 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ metals.sbt
3535
.idea_modules
3636
/.worksheet/
3737

38+
# scala-cli
39+
.scala-build
40+
3841
# Partest
3942
dotty.jar
4043
dotty-lib.jar
@@ -90,3 +93,5 @@ compiler/test-coursier/run/*.jar
9093
# docs related
9194
contributors.js
9295
content-contributors.css
96+
docs/_spec/_site/
97+
docs/_spec/.jekyll-metadata

CONTRIBUTING.md

Lines changed: 4 additions & 59 deletions
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://docs.scala-lang.org/scala3/guides/contribution/contribution-intro.html), which should have all the info you're looking for.

0 commit comments

Comments
 (0)