Skip to content

Commit db49c88

Browse files
noti0na1tgodzik
authored andcommitted
Remove repl bin; rename flag
1 parent 4eff655 commit db49c88

File tree

5 files changed

+5
-204
lines changed

5 files changed

+5
-204
lines changed

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ trait CommonScalaSettings:
135135
val usejavacp: Setting[Boolean] = BooleanSetting("-usejavacp", "Utilize the java.class.path in classpath resolution.", aliases = List("--use-java-class-path"))
136136
val scalajs: Setting[Boolean] = BooleanSetting("-scalajs", "Compile in Scala.js mode (requires scalajs-library.jar on the classpath).", aliases = List("--scalajs"))
137137
val replInitScript: Setting[String] = StringSetting("-repl-init-script", "code", "The code will be run on REPL startup.", "", aliases = List("--repl-init-script"))
138-
val replEvalOnly: Setting[Boolean] = BooleanSetting("-repl-eval", "Quit REPL after evaluating the init script.", aliases = List("--repl-eval"))
138+
val replEvalOnly: Setting[Boolean] = BooleanSetting("-repl-quit-after-init", "Quit REPL after evaluating the init script.", aliases = List("--repl-quit-after-init"))
139139

140140
end CommonScalaSettings
141141

compiler/test/dotty/tools/scripting/BashExitCodeTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class BashExitCodeTests:
3030
def scala(args: String*) = verifyExit(scalaPath, args*)
3131
def scalacRaw(args: String*) = verifyExit(scalacPath, args*)
3232
def scalac(args: String*) = scalacRaw(("-d" +: tmpDir +: args)*)
33-
def repl(args: String*) = verifyExit(replPath, args*)
33+
def repl(args: String*) = verifyExit(scalaPath, "--power", "repl", "--offline", "--", args*)
3434

3535
/** The path to the test file for this class. */
3636
def f(body: String, suffix: String = ".scala"): String =
@@ -63,7 +63,7 @@ class BashExitCodeTests:
6363
@Test def xPluginList = scala("-Xplugin-list")(0)
6464
@Test def vPhases = scala("-Vphases")(0)
6565

66-
@Test def replEval = repl("--repl-eval", "--repl-init-script", "\'println(\"Hello from init script!\"); val i = 2 * 2\'")(0)
66+
@Test def replEval = repl("--repl-quit-after-init", "--repl-init-script", "\'println(\"Hello from init script!\"); val i = 2 * 2\'")(0)
6767

6868
/** A utility for running two commands in a row, like you do in bash. */
6969
extension (inline u1: Unit) inline def & (inline u2: Unit): Unit = { u1; u2 }

compiler/test/dotty/tools/scripting/ScriptTestEnv.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,10 @@ object ScriptTestEnv {
234234

235235
lazy val cwd: Path = Paths.get(".").toAbsolutePath.normalize
236236

237-
lazy val (scalacPath: String, scalaPath: String, replPath: String) = {
237+
lazy val (scalacPath: String, scalaPath: String) = {
238238
val scalac = s"$workingDirectory/dist/target/pack/bin/scalac".toPath.normalize
239239
val scala = s"$workingDirectory/dist/target/pack/bin/scala".toPath.normalize
240-
val repl = s"$workingDirectory/dist/target/pack/bin/repl".toPath.normalize
241-
(scalac.norm, scala.norm, repl.norm)
240+
(scalac.norm, scala.norm)
242241
}
243242

244243

dist/bin/repl

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

dist/bin/repl.bat

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

0 commit comments

Comments
 (0)