Skip to content

Commit f5b1d79

Browse files
authored
Merge pull request #8916 from iamrecursion/wip/ara/fix-build
Closes #8873: Remove the outdated dist subproject
2 parents ed4ce59 + 124273a commit f5b1d79

File tree

9 files changed

+24
-18
lines changed

9 files changed

+24
-18
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ jobs:
368368

369369
- name: Publish Release
370370
run: |
371-
./project/scripts/sbt dist-bootstrapped/packArchive
372-
sha256sum dist-bootstrapped/target/dotty-* > dist-bootstrapped/target/sha256sum.txt
371+
./project/scripts/sbt dist/packArchive
372+
sha256sum dist/target/dotty-* > dist/target/sha256sum.txt
373373
./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease"
374374
echo "::set-env name=RELEASE_TAG::${GITHUB_REF#*refs/tags/}"
375375
@@ -391,7 +391,7 @@ jobs:
391391
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
392392
with:
393393
upload_url: ${{ steps.create_gh_release.outputs.upload_url }}
394-
asset_path: ./dist-bootstrapped/target/dotty-${{ env.RELEASE_TAG }}.zip
394+
asset_path: ./dist/target/dotty-${{ env.RELEASE_TAG }}.zip
395395
asset_name: dotty-${{ env.RELEASE_TAG }}.zip
396396
asset_content_type: application/zip
397397

@@ -401,7 +401,7 @@ jobs:
401401
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
402402
with:
403403
upload_url: ${{ steps.create_gh_release.outputs.upload_url }}
404-
asset_path: ./dist-bootstrapped/target/dotty-${{ env.RELEASE_TAG }}.tar.gz
404+
asset_path: ./dist/target/dotty-${{ env.RELEASE_TAG }}.tar.gz
405405
asset_name: dotty-${{ env.RELEASE_TAG }}.tar.gz
406406
asset_content_type: application/gzip
407407

@@ -411,7 +411,7 @@ jobs:
411411
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
412412
with:
413413
upload_url: ${{ steps.create_gh_release.outputs.upload_url }}
414-
asset_path: ./dist-bootstrapped/target/sha256sum.txt
414+
asset_path: ./dist/target/sha256sum.txt
415415
asset_name: sha256sum.txt
416416
asset_content_type: text/plain
417417

bin/common

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ target="$1"
1010
shift # Mutates $@ by deleting the first element ($1)
1111

1212
# Marker file used to obtain the date of latest call to sbt-back
13-
version="$ROOT/dist-bootstrapped/target/pack/VERSION"
13+
version="$ROOT/dist/target/pack/VERSION"
1414

1515
# Create the target if absent or if file changed in ROOT/compiler
1616
new_files="$(find "$ROOT/compiler" \( -iname "*.scala" -o -iname "*.java" \) -newer "$version" 2> /dev/null)"
1717

1818
if [ ! -f "$version" ] || [ ! -z "$new_files" ]; then
1919
echo "Building Dotty..."
20-
(cd $ROOT && sbt "dist-bootstrapped/pack")
20+
(cd $ROOT && sbt "dist/pack")
2121
fi
2222

2323
eval "$target" "$@"

bin/dotc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >& /dev/null && pwd)/.."
44

5-
eval "$ROOT/bin/common" "$ROOT/dist-bootstrapped/target/pack/bin/dotc" "$@"
5+
eval "$ROOT/bin/common" "$ROOT/dist/target/pack/bin/dotc" "$@"

bin/dotd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >& /dev/null && pwd)/.."
44

5-
eval "$ROOT/bin/common" "$ROOT/dist-bootstrapped/target/pack/bin/dotd" "$@"
5+
eval "$ROOT/bin/common" "$ROOT/dist/target/pack/bin/dotd" "$@"

bin/dotr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >& /dev/null && pwd)/.."
44

5-
eval "$ROOT/bin/common" "$ROOT/dist-bootstrapped/target/pack/bin/dotr" "$@"
5+
eval "$ROOT/bin/common" "$ROOT/dist/target/pack/bin/dotr" "$@"

build.sbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ val `scala-compiler` = Build.`scala-compiler`
2626
val `scala-reflect` = Build.`scala-reflect`
2727
val scalap = Build.scalap
2828
val dist = Build.dist
29-
val `dist-bootstrapped` = Build.`dist-bootstrapped`
3029
val `community-build` = Build.`community-build`
3130

3231
val sjsSandbox = Build.sjsSandbox

docs/docs/contributing/testing.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ Running all tests in Dotty is as simple as:
99
$ sbt test
1010
```
1111

12+
Specifically, `sbt test` runs all tests that do _not_ require a bootstrapped
13+
compiler. In practice, this means that it runs all compilation tests meeting
14+
this criterion, as well as all non-compiler tests.
15+
16+
The entire suite of tests can be run using the bootstrapped compiler as follows:
17+
18+
```bash
19+
$ sbt
20+
> dotty-bootstrapped/test
21+
```
22+
1223
There are currently several forms of tests in Dotty. These can be split into
1324
two categories:
1425

project/Build.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,14 +1315,10 @@ object Build {
13151315
packArchiveName := "dotty-" + dottyVersion
13161316
)
13171317

1318-
lazy val dist = project.asDist(NonBootstrapped)
1318+
lazy val dist = project.asDist(Bootstrapped)
13191319
.settings(
13201320
packResourceDir += (baseDirectory.value / "bin" -> "bin"),
13211321
)
1322-
lazy val `dist-bootstrapped` = project.asDist(Bootstrapped)
1323-
.settings(
1324-
packResourceDir += ((baseDirectory in dist).value / "bin" -> "bin"),
1325-
)
13261322

13271323
implicit class ProjectDefinitions(val project: Project) extends AnyVal {
13281324

project/scripts/bootstrapCmdTests

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ grep -qe "val a: scala.Int = 3" "$tmp"
1414

1515

1616
# setup for `dotc`/`dotr` script tests
17-
"$SBT" dist-bootstrapped/pack
17+
"$SBT" dist/pack
1818

1919
# check that `dotc` compiles and `dotr` runs it
2020
echo "testing ./bin/dotc and ./bin/dotr"
@@ -36,7 +36,7 @@ clear_out "$OUT1"
3636
./bin/dotr -classpath "$OUT1" "$MAIN" > "$tmp"
3737
test "$EXPECTED_OUTPUT" = "$(cat "$tmp")"
3838

39-
# echo ":quit" | ./dist-bootstrapped/target/pack/bin/dotr # not supported by CI
39+
# echo ":quit" | ./dist/target/pack/bin/dotr # not supported by CI
4040

4141
echo "testing ./bin/dotd"
4242
clear_out "$OUT"

0 commit comments

Comments
 (0)