Skip to content

Commit 91fbe52

Browse files
authored
Merge pull request #1 from lampepfl/master
Pull updates from base repo.
2 parents 480f95f + e8d748e commit 91fbe52

File tree

3,095 files changed

+89465
-42129
lines changed

Some content is hidden

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

3,095 files changed

+89465
-42129
lines changed

.github/workflows/ci.yaml

Lines changed: 294 additions & 263 deletions
Large diffs are not rendered by default.

.github/workflows/cla.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Scala CLA
2+
on: [pull_request]
3+
jobs:
4+
check:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- run: ./project/scripts/check-cla.sh

.github/workflows/repositories

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[repositories]
2+
local
3+
my-ivy-proxy-releases: https://scala-webapps.epfl.ch/artifactory/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
4+
my-maven-proxy-releases: https://scala-webapps.epfl.ch/artifactory/central/

.github/workflows/scala3doc.yaml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: CI for Scala3doc
2+
3+
on:
4+
push:
5+
pull_request:
6+
jobs:
7+
build:
8+
env:
9+
AZURE_STORAGE_SAS_TOKEN: ${{ secrets.AZURE_STORAGE_SAS_TOKEN }}
10+
runs-on: ubuntu-latest
11+
if: "github.event_name == 'pull_request' || contains(github.event.ref, 'scala3doc') || contains(github.event.ref, 'master')"
12+
13+
steps:
14+
- name: Git Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Cache Coursier
18+
uses: actions/cache@v1
19+
with:
20+
path: ~/.cache/coursier
21+
key: sbt-coursier-cache
22+
- name: Cache SBT
23+
uses: actions/cache@v1
24+
with:
25+
path: ~/.sbt
26+
key: sbt-${{ hashFiles('**/build.sbt') }}
27+
28+
- name: Set up JDK 11
29+
uses: actions/setup-java@v1
30+
with:
31+
java-version: 11
32+
33+
- name: Compile and test
34+
run: ./project/scripts/sbt scala3doc/test
35+
36+
- name: Locally publish self
37+
run: ./project/scripts/sbt scala3doc/publishLocal
38+
39+
- name: Generate self documentation
40+
run: ./project/scripts/sbt scala3doc/generateSelfDocumentation
41+
42+
- name: Generate testcases documentation
43+
run: ./project/scripts/sbt scala3doc/generateTestcasesDocumentation
44+
45+
- name: Generate Scala 3 documentation
46+
run: ./project/scripts/sbt scala3doc/generateScala3Documentation
47+
48+
- name: Generate documentation for example project using dotty-sbt
49+
run: ./project/scripts/sbt "sbt-dotty/scripted sbt-dotty/scala3doc"
50+
51+
- name: Generate index file
52+
run: scala3doc/scripts/mk-index.sh scala3doc/output > scala3doc/output/index.html
53+
54+
- name: Upload documentation to server
55+
uses: azure/CLI@v1
56+
if: env.AZURE_STORAGE_SAS_TOKEN
57+
env:
58+
PR_NUMBER: ${{ github.event.pull_request.number }}
59+
with:
60+
inlineScript: |
61+
DOC_DEST=pr-${PR_NUMBER:-${GITHUB_REF##*/}}
62+
echo uplading docs to https://scala3doc.virtuslab.com/$DOC_DEST
63+
az storage container create --name $DOC_DEST --account-name scala3docstorage --public-access container
64+
az storage blob sync -s scala3doc/output -c $DOC_DEST --account-name scala3docstorage
65+
66+
community-docs:
67+
env:
68+
AZURE_STORAGE_SAS_TOKEN: ${{ secrets.AZURE_STORAGE_SAS_TOKEN }}
69+
runs-on: ubuntu-latest
70+
if: "github.event_name == 'pull_request' || contains(github.event.ref, 'scala3doc') || contains(github.event.ref, 'master')"
71+
72+
steps:
73+
- name: Git Checkout
74+
uses: actions/checkout@v2
75+
76+
- name: Set up JDK 8
77+
uses: actions/setup-java@v1
78+
with:
79+
java-version: 8
80+
81+
- name: Init submodules
82+
run: git submodule update --init --recursive --jobs 7
83+
84+
- name: Generate docs
85+
run: ./project/scripts/sbt "community-build/run doc all docsOutput"
86+
87+
- name: Upload documentation to server
88+
uses: azure/CLI@v1
89+
if: env.AZURE_STORAGE_SAS_TOKEN
90+
env:
91+
PR_NUMBER: ${{ github.event.pull_request.number }}
92+
with:
93+
inlineScript: |
94+
DOC_DEST=pr-${PR_NUMBER:-${GITHUB_REF##*/}}-docs
95+
echo uplading docs to https://scala3doc.virtuslab.com/$DOC_DEST
96+
az storage container create --name $DOC_DEST --account-name scala3docstorage --public-access container
97+
az storage blob sync -s community-build/docsOutput -c $DOC_DEST --account-name scala3docstorage

.gitignore

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
*.DS_Store
22
*.class
33
*.tasty
4-
*.hasTasty
54
*.log
65
*.swp
76
*~
@@ -24,12 +23,12 @@ local.sbt
2423
# npm
2524
node_modules
2625

27-
# VS Code
26+
# VS Code
2827
.vscode/
2928
# Metals
3029
.bloop/
3130
.metals/
32-
project/metals.sbt
31+
metals.sbt
3332

3433
# Scala-IDE specific
3534
.scala_dependencies
@@ -82,8 +81,13 @@ bench/compile.txt
8281
# The vscode app for testing
8382
vscode-dotty/.vscode-test
8483

85-
community-build/dotty-bootstrapped.version
84+
community-build/scala3-bootstrapped.version
8685
community-build/sbt-dotty-sbt
86+
community-build/sbt-scalajs-sbt
8787

8888
# Vulpix output files
8989
*.check.out
90+
!/dist/bin/
91+
92+
# Bloop
93+
.bsp

.gitmodules

Lines changed: 82 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
[submodule "community-build/community-projects/scalatest"]
1414
path = community-build/community-projects/scalatest
1515
url = https://github.com/dotty-staging/scalatest
16-
[submodule "community-build/community-projects/scopt"]
17-
path = community-build/community-projects/scopt
18-
url = https://github.com/dotty-staging/scopt
19-
[submodule "community-build/community-projects/squants"]
20-
path = community-build/community-projects/squants
21-
url = https://github.com/dotty-staging/squants
2216
[submodule "community-build/community-projects/scalap"]
2317
path = community-build/community-projects/scalap
2418
url = https://github.com/dotty-staging/scala
@@ -67,7 +61,7 @@
6761
url = https://github.com/dotty-staging/upickle.git
6862
[submodule "community-build/community-projects/sconfig"]
6963
path = community-build/community-projects/sconfig
70-
url = https://github.com/ekrich/sconfig.git
64+
url = https://github.com/dotty-staging/sconfig.git
7165
[submodule "community-build/community-projects/zio"]
7266
path = community-build/community-projects/zio
7367
url = https://github.com/dotty-staging/zio.git
@@ -95,8 +89,88 @@
9589
path = community-build/community-projects/scalaz
9690
url = https://github.com/dotty-staging/scalaz.git
9791
[submodule "community-build/community-projects/endpoints"]
98-
path = community-build/community-projects/endpoints
92+
path = community-build/community-projects/endpoints4s
9993
url = https://github.com/dotty-staging/endpoints.git
10094
[submodule "community-build/community-projects/scas"]
10195
path = community-build/community-projects/scas
10296
url = https://github.com/dotty-staging/scas.git
97+
[submodule "community-build/community-projects/fansi"]
98+
path = community-build/community-projects/fansi
99+
url = https://github.com/dotty-staging/fansi.git
100+
[submodule "community-build/community-projects/PPrint"]
101+
path = community-build/community-projects/PPrint
102+
url = https://github.com/dotty-staging/PPrint.git
103+
[submodule "community-build/community-projects/requests-scala"]
104+
path = community-build/community-projects/requests-scala
105+
url = https://github.com/dotty-staging/requests-scala.git
106+
[submodule "community-build/community-projects/cats-effect-2"]
107+
path = community-build/community-projects/cats-effect-2
108+
url = https://github.com/dotty-staging/cats-effect.git
109+
branch = series/2.x
110+
[submodule "community-build/community-projects/cats-effect-3"]
111+
path = community-build/community-projects/cats-effect-3
112+
url = https://github.com/dotty-staging/cats-effect.git
113+
branch = series/3.x
114+
[submodule "community-build/community-projects/scala-parallel-collections"]
115+
path = community-build/community-projects/scala-parallel-collections
116+
url = https://github.com/dotty-staging/scala-parallel-collections.git
117+
[submodule "community-build/community-projects/scala-collection-compat"]
118+
path = community-build/community-projects/scala-collection-compat
119+
url = https://github.com/dotty-staging/scala-collection-compat.git
120+
[submodule "community-build/community-projects/verify"]
121+
path = community-build/community-projects/verify
122+
url = https://github.com/dotty-staging/nanotest-strawman.git
123+
[submodule "community-build/community-projects/discipline"]
124+
path = community-build/community-projects/discipline
125+
url = https://github.com/dotty-staging/discipline.git
126+
[submodule "community-build/community-projects/discipline-munit"]
127+
path = community-build/community-projects/discipline-munit
128+
url = https://github.com/dotty-staging/discipline-munit.git
129+
[submodule "community-build/community-projects/discipline-specs2"]
130+
path = community-build/community-projects/discipline-specs2
131+
url = https://github.com/dotty-staging/discipline-specs2.git
132+
[submodule "community-build/community-projects/simulacrum-scalafix"]
133+
path = community-build/community-projects/simulacrum-scalafix
134+
url = https://github.com/dotty-staging/simulacrum-scalafix.git
135+
[submodule "community-build/community-projects/cats"]
136+
path = community-build/community-projects/cats
137+
url = https://github.com/dotty-staging/cats.git
138+
[submodule "community-build/community-projects/cats-mtl"]
139+
path = community-build/community-projects/cats-mtl
140+
url = https://github.com/dotty-staging/cats-mtl.git
141+
[submodule "community-build/community-projects/coop"]
142+
path = community-build/community-projects/coop
143+
url = https://github.com/dotty-staging/coop.git
144+
[submodule "community-build/community-projects/AsyncFile"]
145+
path = community-build/community-projects/AsyncFile
146+
url = https://github.com/dotty-staging/AsyncFile.git
147+
[submodule "community-build/community-projects/Equal"]
148+
path = community-build/community-projects/Equal
149+
url = https://github.com/dotty-staging/Equal.git
150+
[submodule "community-build/community-projects/FingerTree"]
151+
path = community-build/community-projects/FingerTree
152+
url = https://github.com/dotty-staging/FingerTree.git
153+
[submodule "community-build/community-projects/Log"]
154+
path = community-build/community-projects/Log
155+
url = https://github.com/dotty-staging/Log.git
156+
[submodule "community-build/community-projects/Model"]
157+
path = community-build/community-projects/Model
158+
url = https://github.com/dotty-staging/Model.git
159+
[submodule "community-build/community-projects/Numbers"]
160+
path = community-build/community-projects/Numbers
161+
url = https://github.com/dotty-staging/Numbers.git
162+
[submodule "community-build/community-projects/Serial"]
163+
path = community-build/community-projects/Serial
164+
url = https://github.com/dotty-staging/Serial.git
165+
[submodule "community-build/community-projects/Span"]
166+
path = community-build/community-projects/Span
167+
url = https://github.com/dotty-staging/Span.git
168+
[submodule "community-build/community-projects/Lucre"]
169+
path = community-build/community-projects/Lucre
170+
url = https://github.com/dotty-staging/Lucre.git
171+
[submodule "community-build/community-projects/scala-stm"]
172+
path = community-build/community-projects/scala-stm
173+
url = https://github.com/dotty-staging/scala-stm.git
174+
[submodule "community-build/community-projects/scalatestplus-junit"]
175+
path = community-build/community-projects/scalatestplus-junit
176+
url = https://github.com/dotty-staging/scalatestplus-junit.git

.jvmopts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
-Xss1m
22
-Xms512m
3-
-Xmx1200m
3+
-Xmx4096m
44
-XX:MaxInlineLevel=35
5+
-XX:ReservedCodeCacheSize=512m

.vscode-template/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
"search.exclude": {
99
"**/*.class": true,
10-
"**/*.hasTasty": true,
10+
"**/*.tasty": true,
1111
"**/target/": true,
1212
"community-build/community-projects": true
1313
}

bench/src/main/scala/Benchmarks.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import scala.collection.JavaConverters._
1717
import scala.io.Source
1818
import scala.util.Using
1919

20+
import dotty.tools.io.AbstractFile
21+
2022
object Bench {
2123
val COMPILE_OPTS_FILE = "compile.txt"
2224

@@ -93,16 +95,16 @@ class CompilerOptions {
9395

9496
class Worker extends Driver {
9597
// override to avoid printing summary information
96-
override def doCompile(compiler: Compiler, fileNames: List[String])(implicit ctx: Context): Reporter =
97-
if (fileNames.nonEmpty)
98+
override def doCompile(compiler: Compiler, files: List[AbstractFile])(implicit ctx: Context): Reporter =
99+
if (files.nonEmpty)
98100
try {
99101
val run = compiler.newRun
100-
run.compile(fileNames)
102+
run.compile(files)
101103
ctx.reporter
102104
}
103105
catch {
104106
case ex: FatalError =>
105-
ctx.error(ex.getMessage) // signals that we should fail compilation.
107+
report.error(ex.getMessage) // signals that we should fail compilation.
106108
ctx.reporter
107109
}
108110
else ctx.reporter

bin/common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ if [ ! -f "$version" ] || [ ! -z "$new_files" ]; then
2020
(cd $ROOT && sbt "dist/pack")
2121
fi
2222

23-
eval "$target" "$@"
23+
"$target" "$@"

bin/dotc

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

bin/dotd

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

bin/dotr

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

bin/scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >& /dev/null && pwd)/.."
4+
5+
"$ROOT/bin/common" "$ROOT/dist/target/pack/bin/scala" "$@"

bin/scalac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >& /dev/null && pwd)/.."
4+
5+
"$ROOT/bin/common" "$ROOT/dist/target/pack/bin/scalac" "$@"

bin/scalad

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >& /dev/null && pwd)/.."
4+
5+
"$ROOT/bin/common" "$ROOT/dist/target/pack/bin/scalad" "$@"

0 commit comments

Comments
 (0)