From c2ff5d19d8ac1c123ded829c05bb1bffd2ac1776 Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Mon, 27 Oct 2025 13:40:56 +0100 Subject: [PATCH 1/2] Update `MainGenericRunner` deprecation message for removal in 3.8.0 --- compiler/src/dotty/tools/MainGenericRunner.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/src/dotty/tools/MainGenericRunner.scala b/compiler/src/dotty/tools/MainGenericRunner.scala index 9ff96f812bca..fcb69c59d840 100644 --- a/compiler/src/dotty/tools/MainGenericRunner.scala +++ b/compiler/src/dotty/tools/MainGenericRunner.scala @@ -273,12 +273,11 @@ object MainGenericRunner { val silenced = sys.props.get("scala.use_legacy_launcher") == Some("true") if !silenced then - Console.err.println(s"[warning] MainGenericRunner class is deprecated since Scala 3.5.0, and Scala CLI features will not work.") - Console.err.println(s"[warning] Please be sure to update to the Scala CLI launcher to use the new features.") + Console.err.println(s"[warning] The MainGenericRunner class and 'legacy_scala' command have been deprecated for removal in Scala 3.8.0.") + Console.err.println(s"[warning] Please be sure to migrate to the scala command (Scala CLI).") if ranByCoursierBootstrap then Console.err.println(s"[warning] It appears that your Coursier-based Scala installation is misconfigured.") Console.err.println(s"[warning] To update to the new Scala CLI runner, please update (coursier, cs) commands first before re-installing scala.") - Console.err.println(s"[warning] Check the Scala 3.5.0 release notes to troubleshoot your installation.") run(settings) match From 843a6b0f5602a1f9c4f63cec1f49790bfb5d9f4b Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Mon, 27 Oct 2025 13:50:24 +0100 Subject: [PATCH 2/2] Deprecate the `-run` and `-repl` command line options for removal in 3.8.0 --- compiler/src/dotty/tools/MainGenericCompiler.scala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/src/dotty/tools/MainGenericCompiler.scala b/compiler/src/dotty/tools/MainGenericCompiler.scala index 98bd9078c397..c84052df75de 100644 --- a/compiler/src/dotty/tools/MainGenericCompiler.scala +++ b/compiler/src/dotty/tools/MainGenericCompiler.scala @@ -100,6 +100,8 @@ object MainGenericCompiler { case ("-q" | "-quiet") :: tail => process(tail, settings.withQuiet) case "-repl" :: tail => + Console.err.println(s"[warning] The -repl command line option has been deprecated removal in Scala 3.8.0.") + Console.err.println(s"[warning] Please use the 'scala repl' command (Scala CLI) to run the REPL.") process(tail, settings.withCompileMode(CompileMode.Repl)) case "-script" :: targetScript :: tail => process(Nil, settings @@ -114,6 +116,8 @@ object MainGenericCompiler { case "-print-tasty" :: tail => process(tail, settings.withCompileMode(CompileMode.PrintTasty)) case "-run" :: tail => + Console.err.println(s"[warning] The -run command line option has been deprecated removal in Scala 3.8.0.") + Console.err.println(s"[warning] Please use the 'scala' command (Scala CLI) instead.") process(tail, settings.withCompileMode(CompileMode.Run)) case "-colors" :: tail => process(tail, settings.withColors)