Skip to content

Commit d581616

Browse files
Rename binaries from e.g. dotc to scalac
1 parent 88a90fc commit d581616

File tree

9 files changed

+30
-29
lines changed

9 files changed

+30
-29
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ local.sbt
2424
# npm
2525
node_modules
2626

27-
# VS Code
27+
# VS Code
2828
.vscode/
2929
# Metals
3030
.bloop/
@@ -87,3 +87,4 @@ community-build/sbt-dotty-sbt
8787

8888
# Vulpix output files
8989
*.check.out
90+
!/dist/bin/

bin/dotc renamed to bin/scalac

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

bin/dotd renamed to bin/scalad

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

bin/dotr renamed to bin/scalar

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

bin/test/TestScripts.scala

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,53 +45,53 @@ class TestScripts {
4545
@Before def buildUp = deletePackages
4646
@After def tearDown = deletePackages
4747

48-
/** bin/dotc script should be able to build hello world and successfully
49-
* execute it using dotr
48+
/** bin/scalac script should be able to build hello world and successfully
49+
* execute it using scalar
5050
*/
5151
@Test def buildAndRunHelloWorld = doUnlessWindows {
52-
val (retDotc, dotcOutput) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
52+
val (retDotc, dotcOutput) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")
5353

54-
// Check correct output of building and running dotc
54+
// Check correct output of building and running scalac
5555
assert(
5656
retDotc == 0,
57-
s"bin/dotc script did not run properly. Output:$lineSep$dotcOutput"
57+
s"bin/scalac script did not run properly. Output:$lineSep$dotcOutput"
5858
)
5959

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

67-
/** bin/dotc script should be able to detect changes in dotty sources and
67+
/** bin/scalac script should be able to detect changes in dotty sources and
6868
* rebuild dotty if needed
6969
*/
7070
@Test def rebuildIfNecessary = doUnlessWindows {
71-
val (retFirstBuild, out1) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
72-
assert(retFirstBuild == 0, s"building dotc failed: $out1")
71+
val (retFirstBuild, out1) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")
72+
assert(retFirstBuild == 0, s"building scalac failed: $out1")
7373

7474
// Create a new file to force rebuild
7575
new JFile("./compiler/src/dotty/tools/dotc/Dummy.scala").createNewFile()
7676

77-
val (retSecondBuild, output) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
77+
val (retSecondBuild, output) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")
7878
assert(
7979
retSecondBuild == 0 && output.contains("rebuilding"),
8080
s"Rebuilding the tool should result in jar files being rebuilt. Status: $retSecondBuild, output:$lineSep$output")
8181
}
8282

83-
/** if no changes to dotty, dotc script should be fast */
83+
/** if no changes to dotty, scalac script should be fast */
8484
@Test def beFastOnNoChanges = doUnlessWindows {
85-
val (retFirstBuild, _) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
86-
assert(retFirstBuild == 0, "building dotc failed")
85+
val (retFirstBuild, _) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")
86+
assert(retFirstBuild == 0, "building scalac failed")
8787

88-
val (ret, output) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
88+
val (ret, output) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")
8989
assert(
9090
ret == 0 && !output.contains("rebuilding"),
9191
s"Project recompiled when it didn't need to be. Status $ret, output:$lineSep$output")
9292
}
9393

94-
/** dotc script should work after corrupting .packages */
94+
/** scalac script should work after corrupting .packages */
9595
@Test def reCreatesPackagesIfNecessary = doUnlessWindows {
9696
import java.nio.file.{Paths, Files}
9797
import java.nio.charset.StandardCharsets
@@ -104,8 +104,8 @@ class TestScripts {
104104

105105
Files.write(Paths.get("./.packages"), contents.getBytes(StandardCharsets.UTF_8))
106106

107-
val (retFirstBuild, output) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
107+
val (retFirstBuild, output) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")
108108
assert(output.contains(".packages file corrupted"))
109-
assert(retFirstBuild == 0, "building dotc failed")
109+
assert(retFirstBuild == 0, "building scalac failed")
110110
}
111111
}

dist/bin/common

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ find_lib () {
104104
fi
105105
}
106106

107-
DOTTY_COMP=$(find_lib "*dotty-compiler*")
108-
DOTTY_INTF=$(find_lib "*dotty-interfaces*")
109-
DOTTY_LIB=$(find_lib "*dotty-library*")
110-
DOTTY_STAGING=$(find_lib "*dotty-staging*")
111-
DOTTY_TASTY_INSPECTOR=$(find_lib "*dotty-tasty-inspector*")
107+
DOTTY_COMP=$(find_lib "*scala3-compiler*")
108+
DOTTY_INTF=$(find_lib "*scala3-interfaces*")
109+
DOTTY_LIB=$(find_lib "*scala3-library*")
110+
DOTTY_STAGING=$(find_lib "*scala3-staging*")
111+
DOTTY_TASTY_INSPECTOR=$(find_lib "*scala3-tasty-inspector*")
112112
TASTY_CORE=$(find_lib "*tasty-core*")
113113
SCALA_ASM=$(find_lib "*scala-asm*")
114114
SCALA_LIB=$(find_lib "*scala-library*")
File renamed without changes.
File renamed without changes.

dist/bin/dotr renamed to dist/bin/scalar

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ if [ $execute_repl == true ] || ([ $execute_run == false ] && [ $options_indicat
8989
if [ "$CLASS_PATH" ]; then
9090
cp_arg="-classpath \"$CLASS_PATH\""
9191
fi
92-
echo "Starting dotty REPL..."
93-
eval "\"$PROG_HOME/bin/dotc\" $cp_arg ${java_options[@]} -repl ${residual_args[@]}"
92+
echo "Starting scala3 REPL..."
93+
eval "\"$PROG_HOME/bin/scalac\" $cp_arg ${java_options[@]} -repl ${residual_args[@]}"
9494
elif [ $execute_repl == true ] || [ ${#residual_args[@]} -ne 0 ]; then
9595
cp_arg="$DOTTY_LIB$PSEP$SCALA_LIB"
9696
if [ -z "$CLASS_PATH" ]; then
@@ -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, dotr only use the last one."
102+
echo "warning: multiple classpaths are found, scalar 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"

0 commit comments

Comments
 (0)