Skip to content

Commit 51b8a82

Browse files
authored
Bump announced Scala 3 Next RC version to 3.8.4-RC1 (#4219)
1 parent 3ec6a9d commit 51b8a82

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

modules/integration/src/test/scala/scala/cli/integration/CoursierScalaInstallationTestHelper.scala

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,23 @@ trait CoursierScalaInstallationTestHelper {
4141
setCommandLine match { case scriptPathRegex(extractedPath) => extractedPath }
4242
val batchScriptPath = os.Path(batchScript)
4343
val oldContent = os.read(batchScriptPath)
44-
val newContent = oldContent.replace(
45-
"call %SCALA_CLI_CMD_WIN%",
46-
s"""set "SCALA_CLI_CMD_WIN=${TestUtil.cliPath}"
47-
|call %SCALA_CLI_CMD_WIN%""".stripMargin
48-
)
44+
val cliPathWin = TestUtil.cliPath
45+
val legacyInvoke = "call %SCALA_CLI_CMD_WIN%"
46+
val newContent =
47+
if oldContent.contains(legacyInvoke) then
48+
oldContent.replace(
49+
legacyInvoke,
50+
s"""set "SCALA_CLI_CMD_WIN=$cliPathWin"
51+
|call %SCALA_CLI_CMD_WIN%""".stripMargin
52+
)
53+
else
54+
// Scala 3.8.4+ Windows launcher uses delayed expansion (!SCALA_CLI_CMD_WIN!) instead of
55+
// `call %SCALA_CLI_CMD_WIN%`. Override the variable after cli-common-platform.bat runs.
56+
val anchor =
57+
"""call "%_PROG_HOME%\libexec\cli-common-platform.bat""""
58+
val injection =
59+
s"$anchor${System.lineSeparator()}${System.lineSeparator()}set \"SCALA_CLI_CMD_WIN=$cliPathWin\""
60+
oldContent.replace(anchor, injection)
4961
expect(newContent != oldContent)
5062
os.write.over(batchScriptPath, newContent)
5163
batchWrapperScript -> batchScriptPath

project/deps/package.mill

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object Scala {
2222
def scala3Next = s"$scala3NextPrefix.3" // the newest/next version of Scala
2323
def scala3NextAnnounced = s"$scala3NextPrefix.2" // the newest/next version of Scala that's been announced
2424
def scala3NextRc = "3.8.4-RC1" // the latest RC version of Scala Next
25-
def scala3NextRcAnnounced = "3.8.3-RC3" // the latest announced RC version of Scala Next
25+
def scala3NextRcAnnounced = "3.8.4-RC1" // the latest announced RC version of Scala Next
2626

2727
// The Scala version used to build the CLI itself.
2828
def defaultInternal = sys.props.get("scala.version.internal").getOrElse(scala3Lts)

0 commit comments

Comments
 (0)