Skip to content

Commit b09583f

Browse files
committed
Merge remote-tracking branch 'origin/main' into scaladoc/new-ui
2 parents 6e38b9f + 8bae490 commit b09583f

File tree

816 files changed

+16374
-8534
lines changed

Some content is hidden

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

816 files changed

+16374
-8534
lines changed

.github/workflows/ci.yaml

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: Dotty
22

33
on:
44
push:
5+
branches-ignore:
6+
- 'language-reference-stable'
57
pull_request:
8+
branches-ignore:
9+
- 'language-reference-stable'
610
schedule:
711
- cron: '0 3 * * *' # Every day at 3 AM
812
workflow_dispatch:
@@ -367,49 +371,6 @@ jobs:
367371
if: ${{ always() }}
368372
run: cat community-build/dotty-community-build-deps || true
369373

370-
community_build_forward_compat:
371-
runs-on: [self-hosted, Linux]
372-
container:
373-
image: lampepfl/dotty:2021-03-22
374-
options: --cpu-shares 4096
375-
volumes:
376-
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
377-
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
378-
- ${{ github.workspace }}/../../cache/general:/root/.cache
379-
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
380-
|| (
381-
github.event_name == 'pull_request'
382-
&& !contains(github.event.pull_request.body, '[skip ci]')
383-
&& !contains(github.event.pull_request.body, '[skip community_build]')
384-
&& contains(github.event.pull_request.body, '[test_forward_compat]')
385-
)
386-
|| (
387-
github.event_name == 'workflow_dispatch'
388-
&& github.repository == 'lampepfl/dotty'
389-
)"
390-
391-
steps:
392-
- name: Reset existing repo
393-
run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
394-
395-
- name: Checkout cleanup script
396-
uses: actions/checkout@v2
397-
398-
- name: Cleanup
399-
run: .github/workflows/cleanup.sh
400-
401-
- name: Git Checkout
402-
uses: actions/checkout@v2
403-
404-
- name: Add SBT proxy repositories
405-
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true
406-
407-
- name: Test
408-
run: |
409-
git submodule sync
410-
git submodule update --init --recursive --jobs 7
411-
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestForwardCompat"
412-
413374
test_sbt:
414375
runs-on: [self-hosted, Linux]
415376
container:
@@ -509,7 +470,7 @@ jobs:
509470
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
510471
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
511472
- ${{ github.workspace }}/../../cache/general:/root/.cache
512-
needs: [test_non_bootstrapped, test, mima, community_build_a, community_build_b, community_build_c, community_build_forward_compat, test_sbt, test_java8]
473+
needs: [test_non_bootstrapped, test, mima, community_build_a, community_build_b, community_build_c, test_sbt, test_java8]
513474
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'lampepfl/dotty'"
514475
env:
515476
NIGHTLYBUILD: yes
@@ -600,6 +561,44 @@ jobs:
600561
external_repository: lampepfl/dotty-website
601562
publish_branch: gh-pages
602563

564+
nightly_unmanaged_community_build:
565+
# Self-hosted runner is used only for getting current build version
566+
runs-on: [self-hosted, Linux]
567+
container:
568+
image: lampepfl/dotty:2021-03-22
569+
options: --cpu-shares 4096
570+
volumes:
571+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
572+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
573+
- ${{ github.workspace }}/../../cache/general:/root/.cache
574+
needs: [publish_nightly]
575+
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'lampepfl/dotty'"
576+
env:
577+
NIGHTLYBUILD: yes
578+
steps:
579+
- name: Reset existing repo
580+
run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
581+
582+
- name: Checkout cleanup script
583+
uses: actions/checkout@v2
584+
585+
- name: Cleanup
586+
run: .github/workflows/cleanup.sh
587+
588+
- name: Git Checkout
589+
uses: actions/checkout@v2
590+
591+
- name: Add SBT proxy repositories
592+
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true
593+
594+
- name: Get version string for this build
595+
run: |
596+
ver=$(./project/scripts/sbt "print scala3-compiler-bootstrapped/version" | tail -n1)
597+
echo "This build version: $ver"
598+
echo "THISBUILD_VERSION=$ver" >> $GITHUB_ENV
599+
# Steps above are copy-pasted from publish_nightly, needed only to resolve THISBUILD_VERSION
600+
- name: Trigger unmanaged community build
601+
run: .github/workflows/scripts/triggerUnmanagedCommunityBuild.sh "${{ secrets.BUILD_TOKEN }}" "$THISBUILD_VERSION"
603602

604603
publish_release:
605604
runs-on: [self-hosted, Linux]

.github/workflows/cla.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
name: Scala CLA
2-
on: [pull_request]
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- 'language-reference-backport'
37
jobs:
48
check:
59
runs-on: ubuntu-latest
610
steps:
711
- uses: actions/checkout@v2
812
- run: ./project/scripts/check-cla.sh
13+
if: github.event_name == 'pull_request'
914
env:
1015
AUTHOR: ${{ github.event.pull_request.user.login }}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: language-reference-documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- 'language-reference-stable'
7+
pull_request:
8+
branches:
9+
- 'language-reference-stable'
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-and-push:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Get current date
17+
id: date
18+
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
19+
20+
- name: Git Checkout
21+
uses: actions/checkout@v3
22+
with:
23+
path: 'dotty'
24+
fetch-depth: 0
25+
ssh-key: ${{ secrets.DOCS_KEY }}
26+
27+
- name: Cache Coursier
28+
uses: actions/cache@v1
29+
with:
30+
path: ~/.cache/coursier
31+
key: sbt-coursier-cache
32+
33+
- name: Cache SBT
34+
uses: actions/cache@v1
35+
with:
36+
path: ~/.sbt
37+
key: sbt-${{ hashFiles('**/build.sbt') }}
38+
39+
- name: Set up JDK 11
40+
uses: actions/setup-java@v1
41+
with:
42+
java-version: 11
43+
44+
- name: Generate reference documentation and test links
45+
run: |
46+
cd dotty
47+
./project/scripts/sbt "scaladoc/generateReferenceDocumentation --no-regenerate-expected-links"
48+
./project/scripts/docsLinksStability ./scaladoc/output/reference ./project/scripts/expected-links/reference-expected-links.txt
49+
cd ..
50+
51+
- name: Push changes to scala3-reference-docs
52+
if: github.event_name == 'push'
53+
uses: actions/checkout@v3
54+
with:
55+
repository: lampepfl/scala3-reference-docs
56+
fetch-depth: 0
57+
submodules: true
58+
ssh-key: ${{ secrets.DOCS_DEPLOY_KEY }}
59+
path: 'scala3-reference-docs'
60+
61+
- if: github.event_name == 'push'
62+
run: |
63+
\cp -a dotty/scaladoc/output/reference/. scala3-reference-docs/
64+
cd scala3-reference-docs
65+
git config user.name gh-actions
66+
git config user.email [email protected]
67+
git add .
68+
if ! git diff-index --quiet HEAD; then
69+
git commit -m "UPDATE ${{ steps.date.outputs.date }}"
70+
git push
71+
fi
72+
cd ..
73+
74+
- name: Merge changes to main
75+
if: github.event_name == 'push'
76+
run: |
77+
cd dotty
78+
git fetch origin main:main
79+
git checkout main
80+
git config user.name gh-actions
81+
git config user.email [email protected]
82+
git merge language-reference-stable
83+
cd ..
84+
85+
- name: Create pull request with backport to main
86+
if: github.event_name == 'push'
87+
uses: peter-evans/create-pull-request@v4
88+
with:
89+
path: dotty
90+
branch: language-reference-backport
91+
labels: area:documentation
92+
title: Backport changes from stable documentation branch
93+
body: This pull request is created automatically after push to stable documentation branch and backports the changes
94+
reviewers: pikinier20,julienrf
95+
assignees: pikinier20
96+

.github/workflows/scaladoc.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: scaladoc
22

33
on:
44
push:
5+
branches-ignore:
6+
- 'language-reference-stable'
57
pull_request:
8+
branches-ignore:
9+
- 'language-reference-stable'
610
jobs:
711
build:
812
env:
@@ -53,15 +57,11 @@ jobs:
5357
- name: Generate testcases documentation
5458
run: ./project/scripts/sbt scaladoc/generateTestcasesDocumentation
5559

56-
- name: Generate reference documentation and check links stability
57-
run: |
58-
./project/scripts/sbt scaladoc/generateReferenceDocumentation
59-
./project/scripts/docsLinksStability ./scaladoc/output/reference ./project/scripts/expected-links/reference-expected-links.txt
60+
- name: Generate reference documentation
61+
run: ./project/scripts/sbt scaladoc/generateReferenceDocumentation
6062

61-
- name: Generate Scala 3 documentation and check links stability
62-
run: |
63-
./project/scripts/sbt scaladoc/generateScalaDocumentation
64-
./project/scripts/docsLinksStability ./scaladoc/output/scala3 ./project/scripts/expected-links/scala3-expected-links.txt
63+
- name: Generate Scala 3 documentation
64+
run: ./project/scripts/sbt scaladoc/generateScalaDocumentation
6565

6666
- name: Generate documentation for example project using dotty-sbt
6767
run: ./project/scripts/sbt "sbt-test/scripted sbt-dotty/scaladoc"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env bash
2+
3+
# This is script for triggering unamanged community build upon releasing nightly version.
4+
# Script sends request to CB Jenkins instance to start the build for given released Scala version
5+
# Prints url of created job to stdout
6+
#
7+
# Requirement:
8+
# - the latest (nightly) version of scala should be published
9+
10+
set -u
11+
12+
if [ $# -ne 2 ]; then
13+
echo "Wrong number of script arguments, expected <token> <scala-version>, got $#: $@"
14+
exit 1
15+
fi
16+
17+
CB_ENDPOINT=https://scala3.westeurope.cloudapp.azure.com
18+
CB_BUILD_TOKEN="$1"
19+
SCALA_VERSION="$2"
20+
21+
startRunResponse=$(curl "${CB_ENDPOINT}/job/runBuild/buildWithParameters?token=${CB_BUILD_TOKEN}&publishedScalaVersion=${SCALA_VERSION}" -v 2>&1)
22+
echo "${startRunResponse}"
23+
queueItem=$(echo "${startRunResponse}" | grep -oP "< Location: \K[\w\d:/.//]+")
24+
# Wait until Jenkins does acknowledge the build (max 1 min )
25+
for i in {1..12}; do
26+
buildUrl=$(curl -s "${queueItem}/api/json?tree=executable[url]" | jq .executable.url)
27+
if [[ "null" == "${buildUrl}" ]]; then
28+
echo "Waiting for build start..."
29+
sleep 5
30+
else
31+
echo "Created build url: ${buildUrl}"
32+
exit 0
33+
fi
34+
done
35+
36+
# Set error if failed to resolve build url
37+
exit 1

.gitmodules

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -216,37 +216,9 @@
216216
[submodule "community-build/community-projects/spire"]
217217
path = community-build/community-projects/spire
218218
url = https://github.com/dotty-staging/spire.git
219-
[submodule "community-build/community-projects/munit-forward-compat"]
220-
path = community-build/community-projects/munit-forward-compat
221-
url = https://github.com/dotty-staging/munit.git
222-
[submodule "community-build/community-projects/discipline-forward-compat"]
223-
path = community-build/community-projects/discipline-forward-compat
224-
url = https://github.com/dotty-staging/discipline.git
225-
[submodule "community-build/community-projects/discipline-munit-forward-compat"]
226-
path = community-build/community-projects/discipline-munit-forward-compat
227-
url = https://github.com/dotty-staging/discipline-munit.git
228-
[submodule "community-build/community-projects/discipline-specs2-forward-compat"]
229-
path = community-build/community-projects/discipline-specs2-forward-compat
230-
url = https://github.com/dotty-staging/discipline-specs2.git
231-
[submodule "community-build/community-projects/simulacrum-scalafix-forward-compat"]
232-
path = community-build/community-projects/simulacrum-scalafix-forward-compat
233-
url = https://github.com/dotty-staging/simulacrum-scalafix.git
234-
[submodule "community-build/community-projects/cats-forward-compat"]
235-
path = community-build/community-projects/cats-forward-compat
236-
url = https://github.com/dotty-staging/cats.git
237-
[submodule "community-build/community-projects/cats-mtl-forward-compat"]
238-
path = community-build/community-projects/cats-mtl-forward-compat
239-
url = https://github.com/dotty-staging/cats-mtl.git
240-
[submodule "community-build/community-projects/coop-forward-compat"]
241-
path = community-build/community-projects/coop-forward-compat
242-
url = https://github.com/dotty-staging/coop.git
243-
[submodule "community-build/community-projects/cats-effect-3-forward-compat"]
244-
path = community-build/community-projects/cats-effect-3-forward-compat
245-
url = https://github.com/dotty-staging/cats-effect.git
246-
branch = series/3.x
247-
[submodule "community-build/community-projects/scalacheck-forward-compat"]
248-
path = community-build/community-projects/scalacheck-forward-compat
249-
url = https://github.com/dotty-staging/scalacheck
250219
[submodule "community-build/community-projects/http4s"]
251220
path = community-build/community-projects/http4s
252221
url = https://github.com/dotty-staging/http4s.git
222+
[submodule "community-build/community-projects/parboiled2"]
223+
path = community-build/community-projects/parboiled2
224+
url = https://github.com/dotty-staging/parboiled2.git

NOTICE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ major authors were omitted by oversight.
8888
docs/js/. Please refer to the license header of the concerned files for
8989
details.
9090

91+
* dotty.tools.dotc.coverage: Coverage instrumentation utilities have been
92+
adapted from the scoverage plugin for scala 2 [5], which is under the
93+
Apache 2.0 license.
94+
9195
* The Dotty codebase contains parts which are derived from
9296
the ScalaPB protobuf library [4], which is under the Apache 2.0 license.
9397

@@ -96,3 +100,4 @@ major authors were omitted by oversight.
96100
[2] https://github.com/adriaanm/scala/tree/sbt-api-consolidate/src/compiler/scala/tools/sbt
97101
[3] https://github.com/sbt/sbt/tree/0.13/compile/interface/src/main/scala/xsbt
98102
[4] https://github.com/lampepfl/dotty/pull/5783/files
103+
[5] https://github.com/scoverage/scalac-scoverage-plugin
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
Submodule parboiled2 added at 6281277
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)