Skip to content

Commit ef0e791

Browse files
committed
resolve conflicts
2 parents fbe15ee + 400427d commit ef0e791

File tree

107 files changed

+1508
-1683
lines changed

Some content is hidden

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

107 files changed

+1508
-1683
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 }}

.github/workflows/language-reference.yaml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
with:
2323
path: 'dotty'
2424
ref: 'language-reference-stable'
25+
fetch-depth: 0
2526
ssh-key: ${{ secrets.DOCS_KEY }}
2627

2728
- name: Cache Coursier
@@ -43,8 +44,10 @@ jobs:
4344

4445
- name: Generate reference documentation and test links
4546
run: |
46-
./dotty/project/scripts/sbt scaladoc/generateReferenceDocumentation --no-regenerate-expected-links
47-
./dotty/project/scripts/docsLinksStability ./dotty/scaladoc/output/reference ./dotty/project/scripts/expected-links/reference-expected-links.txt
47+
cd dotty
48+
./project/scripts/sbt scaladoc/generateReferenceDocumentation --no-regenerate-expected-links
49+
./project/scripts/docsLinksStability ./scaladoc/output/reference ./project/scripts/expected-links/reference-expected-links.txt
50+
cd ..
4851
4952
- name: Push changes to scala3-reference-docs
5053
if: github.event_name == 'push'
@@ -63,8 +66,10 @@ jobs:
6366
git config user.name gh-actions
6467
git config user.email [email protected]
6568
git add .
66-
git commit -m "UPDATE ${{ steps.date.outputs.date }}"
67-
git push
69+
if ! git diff-index --quiet HEAD; then
70+
git commit -m "UPDATE ${{ steps.date.outputs.date }}"
71+
git push
72+
fi
6873
cd ..
6974
7075
- name: Merge changes to main
@@ -73,14 +78,20 @@ jobs:
7378
cd dotty
7479
git fetch origin main:main
7580
git checkout main
81+
git config user.name gh-actions
82+
git config user.email [email protected]
7683
git merge language-reference-stable
7784
cd ..
7885
79-
- name: Create pull reuqest with backport to main
86+
- name: Create pull request with backport to main
8087
if: github.event_name == 'push'
8188
uses: peter-evans/create-pull-request@v4
8289
with:
8390
path: dotty
8491
branch: language-reference-backport
8592
labels: area:documentation
93+
title: Backport changes from stable documentation branch
94+
body: This pull request is created automatically after push to stable documentation branch and backports the changes
95+
reviewers: pikinier20,julienrf
96+
assignees: pikinier20
8697

.github/workflows/scaladoc.yaml

Lines changed: 4 additions & 0 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:
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: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -216,37 +216,6 @@
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
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.
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.

community-build/src/scala/dotty/communitybuild/CommunityBuildRunner.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ object CommunityBuildRunner:
1717
* for more infrastructural details.
1818
*/
1919
extension (self: CommunityProject) def run()(using suite: CommunityBuildRunner): Unit =
20-
if self.requiresExperimental && !self.compilerSupportExperimental then
20+
if self.requiresExperimental && !compilerSupportExperimental then
2121
log(s"Skipping ${self.project} - it needs experimental features unsupported in this build.")
2222
return
23-
self.dependencies().foreach(_.publish())
23+
self.dependencies.foreach(_.publish())
2424
self.testOnlyDependencies().foreach(_.publish())
2525
suite.runProject(self)
2626

@@ -45,7 +45,6 @@ trait CommunityBuildRunner:
4545
val project = projectDef.project
4646
val command = projectDef.binaryName
4747
val arguments = projectDef.buildCommands
48-
val compilerVersion = projectDef.compilerVersion
4948

5049
@annotation.tailrec
5150
def execTimes(task: () => Int, timesToRerun: Int): Boolean =

community-build/src/scala/dotty/communitybuild/Main.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ object Main:
5757
val (toRun, ignored) =
5858
allProjects.partition( p =>
5959
p.docCommand != null
60-
&& (!p.requiresExperimental || p.compilerSupportExperimental)
60+
&& (!p.requiresExperimental || compilerSupportExperimental)
6161
)
6262

6363
val paths = toRun.map { project =>

0 commit comments

Comments
 (0)