Skip to content

Commit a41f43b

Browse files
authored
Merge pull request #3450 from Gedochao/maintenance/setup-ide-bsp-test-with-cli-snapshot
Bump Scala CLI launchers to v1.6.0
2 parents 38205e1 + 43f4be9 commit a41f43b

File tree

3 files changed

+20
-21
lines changed

3 files changed

+20
-21
lines changed

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

+18-19
Original file line numberDiff line numberDiff line change
@@ -2191,28 +2191,27 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
21912191
}
21922192
}
21932193

2194-
// TODO: test for the most recent CLI version as well when 1.5.1 is out
2195-
for { cliVersion <- Seq("1.5.0-34-g31a88e428-SNAPSHOT") }
2194+
for { cliVersion <- Seq("1.5.0-34-g31a88e428-SNAPSHOT", "1.6.0") }
21962195
test(
21972196
s"setup-ide prepares a valid BSP configuration with --cli-version $cliVersion"
21982197
) {
2199-
val scriptName = "cli-version.sc"
2200-
val inputs = TestInputs(
2201-
os.rel / scriptName -> s"""println("Hello from launcher v$cliVersion")"""
2202-
)
2203-
inputs.fromRoot { root =>
2204-
val cliVersionArgs = List("--cli-version", cliVersion)
2205-
os.proc(TestUtil.cli, cliVersionArgs, "setup-ide", scriptName, extraOptions).call(cwd =
2206-
root
2207-
)
2208-
val expectedIdeLauncherFile =
2209-
root / Constants.workspaceDirName / "ide-launcher-options.json"
2210-
expect(expectedIdeLauncherFile.toNIO.toFile.exists())
2211-
expect(os.read(expectedIdeLauncherFile).contains(cliVersion))
2212-
val bspConfig = readBspConfig(root)
2213-
expect(bspConfig.argv.head == TestUtil.cliPath)
2214-
expect(bspConfig.argv.containsSlice(cliVersionArgs))
2215-
expect(bspConfig.argv.indexOfSlice(cliVersionArgs) < bspConfig.argv.indexOf("bsp"))
2198+
TestUtil.retryOnCi() {
2199+
val scriptName = "cli-version.sc"
2200+
TestInputs(os.rel / scriptName -> s"""println("Hello from launcher v$cliVersion")""")
2201+
.fromRoot { root =>
2202+
val cliVersionArgs = List("--cli-version", cliVersion)
2203+
os.proc(TestUtil.cli, cliVersionArgs, "setup-ide", scriptName, extraOptions).call(cwd =
2204+
root
2205+
)
2206+
val expectedIdeLauncherFile =
2207+
root / Constants.workspaceDirName / "ide-launcher-options.json"
2208+
expect(expectedIdeLauncherFile.toNIO.toFile.exists())
2209+
expect(os.read(expectedIdeLauncherFile).contains(cliVersion))
2210+
val bspConfig = readBspConfig(root)
2211+
expect(bspConfig.argv.head == TestUtil.cliPath)
2212+
expect(bspConfig.argv.containsSlice(cliVersionArgs))
2213+
expect(bspConfig.argv.indexOfSlice(cliVersionArgs) < bspConfig.argv.indexOf("bsp"))
2214+
}
22162215
}
22172216
}
22182217

scala-cli.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ rem Download the latest version of this script at https://github.com/VirtusLab/s
77

88
setlocal enabledelayedexpansion
99

10-
set "SCALA_CLI_VERSION=1.5.4"
10+
set "SCALA_CLI_VERSION=1.6.0"
1111

1212
set SCALA_CLI_URL=https://github.com/VirtusLab/scala-cli/releases/download/v%SCALA_CLI_VERSION%/scala-cli.bat
1313
set CACHE_BASE=%localappdata%/Coursier/v1

scala-cli.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
set -eu
99

10-
SCALA_CLI_VERSION="1.5.4"
10+
SCALA_CLI_VERSION="1.6.0"
1111

1212
GH_ORG="VirtusLab"
1313
GH_NAME="scala-cli"

0 commit comments

Comments
 (0)