Skip to content
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

Update bloop-config_2.13 to 1.5.3-sc-1 #1257

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
@@ -1,5 +1,7 @@
package scala.cli.integration.util

import coursier.core.Version

import scala.cli.integration.TestUtil
import scala.util.Properties

Expand Down Expand Up @@ -51,24 +53,44 @@ object BloopUtil {
jvm: Option[String] = None
): Seq[String] => os.proc = {

lazy val daemonArgs =
if (Properties.isWin)
Seq("--nailgun-server", "127.0.0.1", "--nailgun-port", "8212")
else
Seq("--daemon-dir", bloopDaemonDir.toString)
val bloopOrg0 = bloopOrg(currentBloopVersion)

lazy val jvmArgs = jvm.toList.flatMap(name => Seq("--jvm", name))
// no more bloopgun for the Bloop fork from version 1.5.3-sc-1
val useScalaCliBloopCommand =
bloopOrg0 != "ch.epfl.scala" && Version(currentBloopVersion) >= Version("1.5.3-sc-1")

args =>
os.proc(
TestUtil.cs,
"launch",
jvmArgs,
s"${bloopOrg(currentBloopVersion)}:bloopgun_2.12:$currentBloopVersion",
"--",
daemonArgs,
args
)
if (useScalaCliBloopCommand) {
val jvmArgs = jvm.toList.flatMap(name => Seq("--bloop-java-opt", name))
args =>
os.proc(
TestUtil.cli,
"bloop",
jvmArgs,
"--bloop-version",
currentBloopVersion.toString,
"--bloop-daemon-dir",
bloopDaemonDir,
args
)
}
else {
val daemonArgs =
if (Properties.isWin)
Seq("--nailgun-server", "127.0.0.1", "--nailgun-port", "8212")
else
Seq("--daemon-dir", bloopDaemonDir.toString)
val jvmArgs = jvm.toList.flatMap(name => Seq("--jvm", name))
args =>
os.proc(
TestUtil.cs,
"launch",
jvmArgs,
s"$bloopOrg0:bloopgun_2.12:$currentBloopVersion",
"--",
daemonArgs,
args
)
}
}
def killBloop(): Unit = {
val javaProcesses = os.proc("jps", "-l").call().out.text().linesIterator
Expand Down
2 changes: 1 addition & 1 deletion project/deps.sc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ object Deps {
def ammonite = ivy"com.lihaoyi:::ammonite:2.5.4-14-dc4c47bc"
def asm = ivy"org.ow2.asm:asm:9.3"
// Force using of 2.13 - is there a better way?
def bloopConfig = ivy"io.github.alexarchambault.bleep:bloop-config_2.13:1.5.0-sc-1"
def bloopConfig = ivy"io.github.alexarchambault.bleep:bloop-config_2.13:1.5.3-sc-1"
def bsp4j = ivy"ch.epfl.scala:bsp4j:2.0.0"
def caseApp = ivy"com.github.alexarchambault:case-app_2.13:2.1.0-M15"
def collectionCompat = ivy"org.scala-lang.modules::scala-collection-compat:2.8.1"
Expand Down