Skip to content

Commit d933794

Browse files
Rename scalar to scala
1 parent d86ae08 commit d933794

File tree

6 files changed

+30
-30
lines changed

6 files changed

+30
-30
lines changed

bin/scalar renamed to bin/scala

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-
"$ROOT/bin/common" "$ROOT/dist/target/pack/bin/scalar" "$@"
5+
"$ROOT/bin/common" "$ROOT/dist/target/pack/bin/scala" "$@"

bin/test/TestScripts.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class TestScripts {
4646
@After def tearDown = deletePackages
4747

4848
/** bin/scalac script should be able to build hello world and successfully
49-
* execute it using scalar
49+
* execute it using scala
5050
*/
5151
@Test def buildAndRunHelloWorld = doUnlessWindows {
5252
val (retDotc, dotcOutput) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")
@@ -57,7 +57,7 @@ class TestScripts {
5757
s"bin/scalac script did not run properly. Output:$lineSep$dotcOutput"
5858
)
5959

60-
val (retDotr, dotrOutput) = executeScript("./bin/scalar HelloWorld")
60+
val (retDotr, dotrOutput) = executeScript("./bin/scala HelloWorld")
6161
assert(
6262
retDotr == 0 && dotrOutput == "hello world\n",
6363
s"Running hello world exited with status: $retDotr and output: $dotrOutput"

dist/bin/scalar renamed to dist/bin/scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ elif [ $execute_repl == true ] || [ ${#residual_args[@]} -ne 0 ]; then
9999
cp_arg+="$PSEP$CLASS_PATH"
100100
fi
101101
if [ "$class_path_count" -gt 1 ]; then
102-
echo "warning: multiple classpaths are found, scalar only use the last one."
102+
echo "warning: multiple classpaths are found, scala only use the last one."
103103
fi
104104
if [ $with_compiler == true ]; then
105105
cp_arg+="$PSEP$DOTTY_COMP$PSEP$TASTY_CORE$PSEP$DOTTY_INTF$PSEP$SCALA_ASM$PSEP$DOTTY_STAGING$PSEP$DOTTY_TASTY_INSPECTOR"

project/Build.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ object Build {
117117
// Used to compile files similar to ./bin/scalac script
118118
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/scalar script
121-
val scalar = inputKey[Unit]("run compiled binary using the correct classpath, or the user supplied classpath")
120+
// Used to run binaries similar to ./bin/scala script
121+
val scala = 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-
scalar := {
560+
scala := {
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 `scalar` without args. Use `repl` to run the repl or add args to run the dotty application")
574+
println("Couldn't run `scala` 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")) {

project/scripts/bootstrapCmdTests

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,35 @@ source $(dirname $0)/cmdTestsCommon.inc.sh
1010
"$SBT" "scala3-bench-bootstrapped/jmh:run 1 1 tests/pos/alias.scala"
1111
"$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 scalar"
14-
"$SBT" ";scala3-compiler-bootstrapped/scalac -with-compiler tests/run-staging/quote-run.scala; scala3-compiler-bootstrapped/scalar -with-compiler Test" > "$tmp"
13+
echo "testing scala.quoted.Expr.run from sbt scala"
14+
"$SBT" ";scala3-compiler-bootstrapped/scalac -with-compiler tests/run-staging/quote-run.scala; scala3-compiler-bootstrapped/scala -with-compiler Test" > "$tmp"
1515
grep -qe "val a: scala.Int = 3" "$tmp"
1616

1717

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

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

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

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

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

4343
echo "testing ./bin/scalad"
4444
clear_out "$OUT"

project/scripts/cmdTests

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

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

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"
5+
# check that `sbt scalac` compiles and `sbt scala` runs it
6+
echo "testing sbt scalac and scala"
7+
"$SBT" ";scalac $SOURCE -d $OUT ;scala -classpath $OUT $MAIN" > "$tmp"
88
grep -qe "$EXPECTED_OUTPUT" "$tmp"
99

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

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

2121
# check that `sbt scalac -decompile` runs
@@ -27,9 +27,9 @@ echo "testing sbt scalac -decompile from file"
2727
"$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 scalar with no -classpath"
30+
echo "testing sbt scala with no -classpath"
3131
clear_out "$OUT"
32-
"$SBT" ";scalac $SOURCE ; scalar $MAIN" > "$tmp"
32+
"$SBT" ";scalac $SOURCE ; scala $MAIN" > "$tmp"
3333
grep -qe "$EXPECTED_OUTPUT" "$tmp"
3434

3535
echo "testing loading tasty from .tasty file in jar"

0 commit comments

Comments
 (0)