Skip to content

Bump Scala CLI launchers to v1.6.0 #3450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2191,28 +2191,27 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
}
}

// TODO: test for the most recent CLI version as well when 1.5.1 is out
for { cliVersion <- Seq("1.5.0-34-g31a88e428-SNAPSHOT") }
for { cliVersion <- Seq("1.5.0-34-g31a88e428-SNAPSHOT", "1.6.0") }
test(
s"setup-ide prepares a valid BSP configuration with --cli-version $cliVersion"
) {
val scriptName = "cli-version.sc"
val inputs = TestInputs(
os.rel / scriptName -> s"""println("Hello from launcher v$cliVersion")"""
)
inputs.fromRoot { root =>
val cliVersionArgs = List("--cli-version", cliVersion)
os.proc(TestUtil.cli, cliVersionArgs, "setup-ide", scriptName, extraOptions).call(cwd =
root
)
val expectedIdeLauncherFile =
root / Constants.workspaceDirName / "ide-launcher-options.json"
expect(expectedIdeLauncherFile.toNIO.toFile.exists())
expect(os.read(expectedIdeLauncherFile).contains(cliVersion))
val bspConfig = readBspConfig(root)
expect(bspConfig.argv.head == TestUtil.cliPath)
expect(bspConfig.argv.containsSlice(cliVersionArgs))
expect(bspConfig.argv.indexOfSlice(cliVersionArgs) < bspConfig.argv.indexOf("bsp"))
TestUtil.retryOnCi() {
val scriptName = "cli-version.sc"
TestInputs(os.rel / scriptName -> s"""println("Hello from launcher v$cliVersion")""")
.fromRoot { root =>
val cliVersionArgs = List("--cli-version", cliVersion)
os.proc(TestUtil.cli, cliVersionArgs, "setup-ide", scriptName, extraOptions).call(cwd =
root
)
val expectedIdeLauncherFile =
root / Constants.workspaceDirName / "ide-launcher-options.json"
expect(expectedIdeLauncherFile.toNIO.toFile.exists())
expect(os.read(expectedIdeLauncherFile).contains(cliVersion))
val bspConfig = readBspConfig(root)
expect(bspConfig.argv.head == TestUtil.cliPath)
expect(bspConfig.argv.containsSlice(cliVersionArgs))
expect(bspConfig.argv.indexOfSlice(cliVersionArgs) < bspConfig.argv.indexOf("bsp"))
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion scala-cli.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rem Download the latest version of this script at https://github.com/VirtusLab/s

setlocal enabledelayedexpansion

set "SCALA_CLI_VERSION=1.5.4"
set "SCALA_CLI_VERSION=1.6.0"

set SCALA_CLI_URL=https://github.com/VirtusLab/scala-cli/releases/download/v%SCALA_CLI_VERSION%/scala-cli.bat
set CACHE_BASE=%localappdata%/Coursier/v1
Expand Down
2 changes: 1 addition & 1 deletion scala-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

set -eu

SCALA_CLI_VERSION="1.5.4"
SCALA_CLI_VERSION="1.6.0"

GH_ORG="VirtusLab"
GH_NAME="scala-cli"
Expand Down