diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 428c077ba5..2c69c9caea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,9 @@ jobs: "frontend/testOnly bloop.ScalaVersionsSpec" \ "frontend/testOnly -bloop.ScalaVersionsSpec" \ "jsBridge06/test" \ - "jsBridge1/test" + "jsBridge1/test" &&\ + ./bin/sbt-ci.sh \ + "+test:compile" shell: bash launcher-test: runs-on: ${{ matrix.os }} diff --git a/.gitignore b/.gitignore index b960890510..94705d77d9 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ bin/.scalafmt* target/ .bloop/ +.bsp/ # Ensime's config and cache .ensime diff --git a/bloopgun-core/src/main/scala-2.12/bloop/bloopgun/util/Helper.scala b/bloopgun-core/src/main/scala-2.12/bloop/bloopgun/util/Helper.scala new file mode 100644 index 0000000000..7c66542e8b --- /dev/null +++ b/bloopgun-core/src/main/scala-2.12/bloop/bloopgun/util/Helper.scala @@ -0,0 +1,7 @@ +package bloop.bloopgun.util + +object Helper { + import Ordering.Implicits.seqDerivedOrdering + def seqIntOrdering: Ordering[Seq[Int]] = + seqDerivedOrdering[Seq, Int] +} diff --git a/bloopgun-core/src/main/scala-2.13/bloop/bloopgun/util/Helper.scala b/bloopgun-core/src/main/scala-2.13/bloop/bloopgun/util/Helper.scala new file mode 100644 index 0000000000..c10f58007d --- /dev/null +++ b/bloopgun-core/src/main/scala-2.13/bloop/bloopgun/util/Helper.scala @@ -0,0 +1,7 @@ +package bloop.bloopgun.util + +object Helper { + import Ordering.Implicits.seqOrdering + def seqIntOrdering: Ordering[Seq[Int]] = + seqOrdering[Seq, Int] +} diff --git a/bloopgun-core/src/main/scala/bloop/bloopgun/Bloopgun.scala b/bloopgun-core/src/main/scala/bloop/bloopgun/Bloopgun.scala index 0642791a3b..869475602c 100644 --- a/bloopgun-core/src/main/scala/bloop/bloopgun/Bloopgun.scala +++ b/bloopgun-core/src/main/scala/bloop/bloopgun/Bloopgun.scala @@ -11,6 +11,7 @@ import bloop.bloopgun.core.AvailableWithCommand import bloop.bloopgun.core.ListeningAndAvailableAt import bloop.bloopgun.core.ServerStatus import bloop.bloopgun.core.ResolvedAt +import bloop.bloopgun.util.Helper.seqIntOrdering import bloopgun.internal.build.BloopgunInfo import java.io.PrintStream @@ -521,15 +522,13 @@ class BloopgunCli( val jvmOpts = Environment.detectJvmOptionsForServer(found, serverArgs, logger) val stringClasspath = classpath.map(_.normalize.toAbsolutePath).mkString(delimiter) val isBloopFork = { - import Ordering.Implicits.seqDerivedOrdering val ver = bloopVersion .split('.') .toSeq .map(s => scala.util.Try(s.toInt).toOption) .takeWhile(_.nonEmpty) .flatten - val ord = seqDerivedOrdering[Seq, Int] - ord.compare(ver, Seq(1, 4, 13)) >= 0 + seqIntOrdering.compare(ver, Seq(1, 4, 13)) >= 0 } val mainClass = if (isBloopFork) "bloop.Bloop" else "bloop.Server" val cmd = javaBinary ++ finalJvmOpts(jvmOpts) ++ List(