Skip to content

Commit c74c68c

Browse files
Update bloop-config_2.13 to 1.5.3-sc-1 (#1257)
* Update bloop-config_2.13 to 1.5.3-sc-1 * Fix BloopTests Co-authored-by: Alexandre Archambault <alexandre.archambault@gmail.com>
1 parent cacc5d3 commit c74c68c

File tree

2 files changed

+39
-17
lines changed

2 files changed

+39
-17
lines changed

modules/integration/src/test/scala/scala/cli/integration/util/BloopUtil.scala

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package scala.cli.integration.util
22

3+
import coursier.core.Version
4+
35
import scala.cli.integration.TestUtil
46
import scala.util.Properties
57

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

54-
lazy val daemonArgs =
55-
if (Properties.isWin)
56-
Seq("--nailgun-server", "127.0.0.1", "--nailgun-port", "8212")
57-
else
58-
Seq("--daemon-dir", bloopDaemonDir.toString)
56+
val bloopOrg0 = bloopOrg(currentBloopVersion)
5957

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

62-
args =>
63-
os.proc(
64-
TestUtil.cs,
65-
"launch",
66-
jvmArgs,
67-
s"${bloopOrg(currentBloopVersion)}:bloopgun_2.12:$currentBloopVersion",
68-
"--",
69-
daemonArgs,
70-
args
71-
)
62+
if (useScalaCliBloopCommand) {
63+
val jvmArgs = jvm.toList.flatMap(name => Seq("--bloop-java-opt", name))
64+
args =>
65+
os.proc(
66+
TestUtil.cli,
67+
"bloop",
68+
jvmArgs,
69+
"--bloop-version",
70+
currentBloopVersion.toString,
71+
"--bloop-daemon-dir",
72+
bloopDaemonDir,
73+
args
74+
)
75+
}
76+
else {
77+
val daemonArgs =
78+
if (Properties.isWin)
79+
Seq("--nailgun-server", "127.0.0.1", "--nailgun-port", "8212")
80+
else
81+
Seq("--daemon-dir", bloopDaemonDir.toString)
82+
val jvmArgs = jvm.toList.flatMap(name => Seq("--jvm", name))
83+
args =>
84+
os.proc(
85+
TestUtil.cs,
86+
"launch",
87+
jvmArgs,
88+
s"$bloopOrg0:bloopgun_2.12:$currentBloopVersion",
89+
"--",
90+
daemonArgs,
91+
args
92+
)
93+
}
7294
}
7395
def killBloop(): Unit = {
7496
val javaProcesses = os.proc("jps", "-l").call().out.text().linesIterator

project/deps.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ object Deps {
6767
def ammonite = ivy"com.lihaoyi:::ammonite:2.5.4-14-dc4c47bc"
6868
def asm = ivy"org.ow2.asm:asm:9.3"
6969
// Force using of 2.13 - is there a better way?
70-
def bloopConfig = ivy"io.github.alexarchambault.bleep:bloop-config_2.13:1.5.0-sc-1"
70+
def bloopConfig = ivy"io.github.alexarchambault.bleep:bloop-config_2.13:1.5.3-sc-1"
7171
def bsp4j = ivy"ch.epfl.scala:bsp4j:2.0.0"
7272
def caseApp = ivy"com.github.alexarchambault:case-app_2.13:2.1.0-M15"
7373
def collectionCompat = ivy"org.scala-lang.modules::scala-collection-compat:2.8.1"

0 commit comments

Comments
 (0)