Skip to content

Commit 28c877f

Browse files
committed
Remove repl bin; rename flag
1 parent 1a9ba3a commit 28c877f

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
@@ -128,7 +128,7 @@ trait CommonScalaSettings:
128128
val usejavacp: Setting[Boolean] = BooleanSetting(RootSetting, "usejavacp", "Utilize the java.class.path in classpath resolution.", aliases = List("--use-java-class-path"))
129129
val scalajs: Setting[Boolean] = BooleanSetting(RootSetting, "scalajs", "Compile in Scala.js mode (requires scalajs-library.jar on the classpath).", aliases = List("--scalajs"))
130130
val replInitScript: Setting[String] = StringSetting(RootSetting, "repl-init-script", "code", "The code will be run on REPL startup.", "", aliases = List("--repl-init-script"))
131-
val replEvalOnly: Setting[Boolean] = BooleanSetting(RootSetting, "repl-eval", "Quit REPL after evaluating the init script.", aliases = List("--repl-eval"))
131+
val replEvalOnly: Setting[Boolean] = BooleanSetting(RootSetting, "repl-quit-after-init", "Quit REPL after evaluating the init script.", aliases = List("--repl-quit-after-init"))
132132
end CommonScalaSettings
133133

134134
/** -P "plugin" settings. Various tools might support plugins. */

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class BashExitCodeTests:
3636
def scala(args: String*) = verifyExit(scalaPath, ("--power" +: args :+ "--offline" :+ "--server=false")*)
3737
def scalacRaw(args: String*) = verifyExit(scalacPath, args*)
3838
def scalac(args: String*) = scalacRaw(("-d" +: tmpDir +: args)*)
39-
def repl(args: String*) = verifyExit(replPath, args*)
39+
def repl(args: String*) = verifyExit(scalaPath, "--power", "repl", "--offline", "--", args*)
4040

4141
/** The path to the test file for this class. */
4242
def f(body: String, suffix: String = ".scala"): String =
@@ -73,7 +73,7 @@ class BashExitCodeTests:
7373
@Test def xPluginList = scala("-Xplugin-list")(0)
7474
@Test def vPhases = scala("-Vphases")(0)
7575

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

7878
/** A utility for running two commands in a row, like you do in bash. */
7979
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
@@ -292,11 +292,10 @@ object ScriptTestEnv {
292292

293293
lazy val cwd: Path = Paths.get(".").toAbsolutePath.normalize
294294

295-
lazy val (scalacPath: String, scalaPath: String, replPath: String) = {
295+
lazy val (scalacPath: String, scalaPath: String) = {
296296
val scalac = s"$workingDirectory/$packBinDir/scalac".toPath.normalize
297297
val scala = s"$workingDirectory/$packBinDir/scala".toPath.normalize
298-
val repl = s"$workingDirectory/$packBinDir/repl".toPath.normalize
299-
(scalac.norm, scala.norm, repl.norm)
298+
(scalac.norm, scala.norm)
300299
}
301300

302301

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)