Skip to content

Commit 68370f0

Browse files
Rename projects & binaries in project/scripts
1 parent d581616 commit 68370f0

File tree

4 files changed

+52
-52
lines changed

4 files changed

+52
-52
lines changed

project/Build.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ object Build {
114114
// Spawns a repl with the correct classpath
115115
val repl = inputKey[Unit]("run the REPL with correct classpath")
116116

117-
// Used to compile files similar to ./bin/dotc script
118-
val dotc = inputKey[Unit]("run the compiler using the correct classpath, or the user supplied classpath")
117+
// Used to compile files similar to ./bin/scalac script
118+
val scalac = inputKey[Unit]("run the compiler using the correct classpath, or the user supplied classpath")
119119

120-
// Used to run binaries similar to ./bin/dotr script
121-
val dotr = inputKey[Unit]("run compiled binary using the correct classpath, or the user supplied classpath")
120+
// Used to run binaries similar to ./bin/scalar script
121+
val scalar = inputKey[Unit]("run compiled binary using the correct classpath, or the user supplied classpath")
122122

123123
// Compiles the documentation and static site
124124
val genDocs = inputKey[Unit]("run dottydoc to generate static documentation site")
@@ -557,7 +557,7 @@ object Build {
557557
}
558558
}.evaluated,
559559

560-
dotr := {
560+
scalar := {
561561
val args: List[String] = spaceDelimited("<arg>").parsed.toList
562562
val externalDeps = externalCompilerClasspathTask.value
563563
val jars = packageAll.value
@@ -571,7 +571,7 @@ object Build {
571571
}
572572

573573
if (args.isEmpty) {
574-
println("Couldn't run `dotr` without args. Use `repl` to run the repl or add args to run the dotty application")
574+
println("Couldn't run `scalar` without args. Use `repl` to run the repl or add args to run the dotty application")
575575
} else if (scalaLib == "") {
576576
println("Couldn't find scala-library on classpath, please run using script in bin dir instead")
577577
} else if (args.contains("-with-compiler")) {
@@ -586,8 +586,8 @@ object Build {
586586
} else run(args)
587587
},
588588

589-
run := dotc.evaluated,
590-
dotc := runCompilerMain().evaluated,
589+
run := scalac.evaluated,
590+
scalac := runCompilerMain().evaluated,
591591
repl := runCompilerMain(repl = true).evaluated,
592592

593593
/* Add the sources of scalajs-ir.
@@ -1018,7 +1018,7 @@ object Build {
10181018
(
10191019
(dir / "shared/src/test/scala" ** (("*.scala": FileFilter)
10201020
-- "ReflectiveCallTest.scala" // uses many forms of structural calls that are not allowed in Scala 3 anymore
1021-
-- "EnumerationTest.scala" // scala.Enumeration support for Scala.js is not implemented in dotc (yet)
1021+
-- "EnumerationTest.scala" // scala.Enumeration support for Scala.js is not implemented in scalac (yet)
10221022
)).get
10231023

10241024
++ (dir / "shared/src/test/require-sam" ** "*.scala").get

project/scripts/bootstrapCmdTests

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,41 @@ set -e
55
source $(dirname $0)/cmdTestsCommon.inc.sh
66

77
# check that benchmarks can run
8-
"$SBT" "dotty-bench/jmh:run 1 1 tests/pos/alias.scala"
8+
"$SBT" "scala3-bench/jmh:run 1 1 tests/pos/alias.scala"
99
# The above is here as it relies on the bootstrapped library.
10-
"$SBT" "dotty-bench-bootstrapped/jmh:run 1 1 tests/pos/alias.scala"
11-
"$SBT" "dotty-bench-bootstrapped/jmh:run 1 1 -with-compiler compiler/src/dotty/tools/dotc/core/Types.scala"
10+
"$SBT" "scala3-bench-bootstrapped/jmh:run 1 1 tests/pos/alias.scala"
11+
"$SBT" "scala3-bench-bootstrapped/jmh:run 1 1 -with-compiler compiler/src/dotty/tools/dotc/core/Types.scala"
1212

13-
echo "testing scala.quoted.Expr.run from sbt dotr"
14-
"$SBT" ";dotty-compiler-bootstrapped/dotc -with-compiler tests/run-staging/quote-run.scala; dotty-compiler-bootstrapped/dotr -with-compiler Test" > "$tmp"
13+
echo "testing scala.quoted.Expr.run from sbt scalar"
14+
"$SBT" ";scala3-compiler-bootstrapped/scalac -with-compiler tests/run-staging/quote-run.scala; scala3-compiler-bootstrapped/scalar -with-compiler Test" > "$tmp"
1515
grep -qe "val a: scala.Int = 3" "$tmp"
1616

1717

18-
# setup for `dotc`/`dotr` script tests
18+
# setup for `scalac`/`scalar` script tests
1919
"$SBT" dist/pack
2020

21-
# check that `dotc` compiles and `dotr` runs it
22-
echo "testing ./bin/dotc and ./bin/dotr"
21+
# check that `scalac` compiles and `scalar` runs it
22+
echo "testing ./bin/scalac and ./bin/scalar"
2323
clear_out "$OUT"
24-
./bin/dotc "$SOURCE" -d "$OUT"
25-
./bin/dotr -classpath "$OUT" "$MAIN" > "$tmp"
24+
./bin/scalac "$SOURCE" -d "$OUT"
25+
./bin/scalar -classpath "$OUT" "$MAIN" > "$tmp"
2626
test "$EXPECTED_OUTPUT" = "$(cat "$tmp")"
2727

28-
# check that `dotc` and `dotr` works for staging
28+
# check that `scalac` and `scalar` works for staging
2929
clear_out "$OUT"
30-
./bin/dotc tests/run-staging/i4044f.scala -d "$OUT"
31-
./bin/dotr -with-compiler -classpath "$OUT" Test > "$tmp"
32-
./bin/dotd -project Staging -siteroot "$OUT" "tests/run-staging/i4044f.scala"
30+
./bin/scalac tests/run-staging/i4044f.scala -d "$OUT"
31+
./bin/scalar -with-compiler -classpath "$OUT" Test > "$tmp"
32+
./bin/scalad -project Staging -siteroot "$OUT" "tests/run-staging/i4044f.scala"
3333

34-
# check that `dotc -from-tasty` compiles and `dotr` runs it
35-
echo "testing ./bin/dotc -from-tasty and dotr -classpath"
34+
# check that `scalac -from-tasty` compiles and `scalar` runs it
35+
echo "testing ./bin/scalac -from-tasty and scalar -classpath"
3636
clear_out "$OUT1"
37-
./bin/dotc -from-tasty -classpath "$OUT" -d "$OUT1" "$MAIN"
38-
./bin/dotr -classpath "$OUT1" "$MAIN" > "$tmp"
37+
./bin/scalac -from-tasty -classpath "$OUT" -d "$OUT1" "$MAIN"
38+
./bin/scalar -classpath "$OUT1" "$MAIN" > "$tmp"
3939
test "$EXPECTED_OUTPUT" = "$(cat "$tmp")"
4040

41-
# echo ":quit" | ./dist/target/pack/bin/dotr # not supported by CI
41+
# echo ":quit" | ./dist/target/pack/bin/scalar # not supported by CI
4242

43-
echo "testing ./bin/dotd"
43+
echo "testing ./bin/scalad"
4444
clear_out "$OUT"
45-
./bin/dotd -project Hello -siteroot "$OUT" "$SOURCE"
45+
./bin/scalad -project Hello -siteroot "$OUT" "$SOURCE"

project/scripts/cmdTests

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,61 @@
22

33
source $(dirname $0)/cmdTestsCommon.inc.sh
44

5-
# check that `sbt dotc` compiles and `sbt dotr` runs it
6-
echo "testing sbt dotc and dotr"
7-
"$SBT" ";dotc $SOURCE -d $OUT ;dotr -classpath $OUT $MAIN" > "$tmp"
5+
# check that `sbt scalac` compiles and `sbt scalar` runs it
6+
echo "testing sbt scalac and scalar"
7+
"$SBT" ";scalac $SOURCE -d $OUT ;scalar -classpath $OUT $MAIN" > "$tmp"
88
grep -qe "$EXPECTED_OUTPUT" "$tmp"
99

10-
# check that `sbt dotc` compiles and `sbt dotr` runs it
11-
echo "testing sbt dotc -from-tasty and dotr -classpath"
10+
# check that `sbt scalac` compiles and `sbt scalar` runs it
11+
echo "testing sbt scalac -from-tasty and scalar -classpath"
1212
clear_out "$OUT"
13-
"$SBT" ";dotc $SOURCE -d $OUT ;dotc -from-tasty -classpath $OUT -d $OUT1 $MAIN ;dotr -classpath $OUT1 $MAIN" > "$tmp"
13+
"$SBT" ";scalac $SOURCE -d $OUT ;scalac -from-tasty -classpath $OUT -d $OUT1 $MAIN ;scalar -classpath $OUT1 $MAIN" > "$tmp"
1414
grep -qe "$EXPECTED_OUTPUT" "$tmp"
1515

16-
echo "testing sbt dotc -from-tasty from a jar and dotr -classpath"
16+
echo "testing sbt scalac -from-tasty from a jar and scalar -classpath"
1717
clear_out "$OUT"
18-
"$SBT" ";dotc -d $OUT/out.jar $SOURCE ;dotc -from-tasty -d $OUT1 $OUT/out.jar ;dotr -classpath $OUT1 $MAIN" > "$tmp"
18+
"$SBT" ";scalac -d $OUT/out.jar $SOURCE ;scalac -from-tasty -d $OUT1 $OUT/out.jar ;scalar -classpath $OUT1 $MAIN" > "$tmp"
1919
grep -qe "$EXPECTED_OUTPUT" "$tmp"
2020

21-
# check that `sbt dotc -decompile` runs
22-
echo "testing sbt dotc -decompile"
23-
"$SBT" ";dotc -decompile -color:never -classpath $OUT $MAIN" > "$tmp"
21+
# check that `sbt scalac -decompile` runs
22+
echo "testing sbt scalac -decompile"
23+
"$SBT" ";scalac -decompile -color:never -classpath $OUT $MAIN" > "$tmp"
2424
grep -qe "def main(args: scala.Array\[scala.Predef.String\]): scala.Unit =" "$tmp"
2525

26-
echo "testing sbt dotc -decompile from file"
27-
"$SBT" ";dotc -decompile -color:never -classpath $OUT $OUT/$TASTY" > "$tmp"
26+
echo "testing sbt scalac -decompile from file"
27+
"$SBT" ";scalac -decompile -color:never -classpath $OUT $OUT/$TASTY" > "$tmp"
2828
grep -qe "def main(args: scala.Array\[scala.Predef.String\]): scala.Unit =" "$tmp"
2929

30-
echo "testing sbt dotr with no -classpath"
30+
echo "testing sbt scalar with no -classpath"
3131
clear_out "$OUT"
32-
"$SBT" ";dotc $SOURCE ; dotr $MAIN" > "$tmp"
32+
"$SBT" ";scalac $SOURCE ; scalar $MAIN" > "$tmp"
3333
grep -qe "$EXPECTED_OUTPUT" "$tmp"
3434

3535
echo "testing loading tasty from .tasty file in jar"
3636
clear_out "$OUT"
37-
"$SBT" ";dotc -d $OUT/out.jar $SOURCE; dotc -decompile -classpath $OUT/out.jar -color:never $MAIN" > "$tmp"
37+
"$SBT" ";scalac -d $OUT/out.jar $SOURCE; scalac -decompile -classpath $OUT/out.jar -color:never $MAIN" > "$tmp"
3838
grep -qe "def main(args: scala.Array\[scala.Predef.String\]): scala.Unit =" "$tmp"
3939

40-
echo "testing sbt dotc with suspension"
40+
echo "testing sbt scalac with suspension"
4141
clear_out "$OUT"
42-
"$SBT" "dotty-compiler-bootstrapped/dotc -d $OUT tests/pos-macros/macros-in-same-project-1/Bar.scala tests/pos-macros/macros-in-same-project-1/Foo.scala" > "$tmp"
42+
"$SBT" "scala3-compiler-bootstrapped/scalac -d $OUT tests/pos-macros/macros-in-same-project-1/Bar.scala tests/pos-macros/macros-in-same-project-1/Foo.scala" > "$tmp"
4343

4444
# check that missing source file does not crash message rendering
4545
echo "testing that missing source file does not crash message rendering"
4646
clear_out "$OUT"
4747
clear_out "$OUT1"
4848
cp tests/neg/i6371/A_1.scala $OUT/A.scala
4949
cp tests/neg/i6371/B_2.scala $OUT/B.scala
50-
"$SBT" "dotc $OUT/A.scala -d $OUT1"
50+
"$SBT" "scalac $OUT/A.scala -d $OUT1"
5151
rm $OUT/A.scala
52-
"$SBT" "dotc -classpath $OUT1 -d $OUT1 $OUT/B.scala" > "$tmp" 2>&1 || echo "ok"
52+
"$SBT" "scalac -classpath $OUT1 -d $OUT1 $OUT/B.scala" > "$tmp" 2>&1 || echo "ok"
5353
grep -qe "B.scala:2:7" "$tmp"
5454

5555

5656
## Disabled because of flakeyness, should be changed to not depend on sbt
5757
# echo "running Vulpix meta test"
5858
# tmp=$(mktemp)
59-
# if "$SBT" "dotty-compiler/testOnly dotty.tools.vulpix.VulpixMetaTests" > "$tmp" 2>&1; then
59+
# if "$SBT" "scala3-compiler/testOnly dotty.tools.vulpix.VulpixMetaTests" > "$tmp" 2>&1; then
6060
# cat "$tmp"
6161
# echo "failed: sbt exited without error on VulpixMetaTests, these tests are expected to fail"
6262
# exit -1

project/scripts/genDocs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ git checkout "$GIT_HEAD"
2525
### Generate the current snapshot of the website ###
2626
# this command will generate docs in $PWD/docs/_site
2727
SBT="$SCRIPT_DIR/sbt"
28-
"$SBT" "dotty-bootstrapped/genDocs $GENDOC_EXTRA_ARGS"
28+
"$SBT" "scala3-bootstrapped/genDocs $GENDOC_EXTRA_ARGS"
2929

3030
# make sure that the previous command actually succeeded
3131
if [ ! -d "$SITE_OUT_DIR" ]; then

0 commit comments

Comments
 (0)