Skip to content

Commit

Permalink
Merge pull request #49 from scala-cli/fix-2.13-build
Browse files Browse the repository at this point in the history
Fix 2.13 build
  • Loading branch information
alexarchambault authored Jan 21, 2022
2 parents 915412d + 1e74f6f commit 768c3a4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ bin/.scalafmt*

target/
.bloop/
.bsp/

# Ensime's config and cache
.ensime
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package bloop.bloopgun.util

object Helper {
import Ordering.Implicits.seqDerivedOrdering
def seqIntOrdering: Ordering[Seq[Int]] =
seqDerivedOrdering[Seq, Int]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package bloop.bloopgun.util

object Helper {
import Ordering.Implicits.seqOrdering
def seqIntOrdering: Ordering[Seq[Int]] =
seqOrdering[Seq, Int]
}
5 changes: 2 additions & 3 deletions bloopgun-core/src/main/scala/bloop/bloopgun/Bloopgun.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 768c3a4

Please sign in to comment.