Skip to content

Commit

Permalink
fix scala 2 build and run crossversion tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
agourlay committed Jan 16, 2025
1 parent 1168510 commit ed68f78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Build and Test
run: sbt test
run: sbt +test
5 changes: 3 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ def compilerOptions(scalaVersion: String) = Seq(
"-Ywarn-unused:patvars", // Warn if a variable bound in a pattern is unused.
"-Ywarn-unused:privates", // Warn if a private member is unused.
"-Ywarn-value-discard", // Warn when non-Unit expression results are unused.
"-Wnonunit-statement" // Warn when non-unit statements are discarded.
) ++ (if (priorTo2_13(scalaVersion))
Seq(
"-Yno-adapted-args",
"-Ypartial-unification",
"-Xlint:by-name-right-associative",
"-Xfuture"
) else Nil)
) else Seq(
"-Wnonunit-statement" // Warn when non-unit statements are discarded.
))

def priorTo2_13(scalaVersion: String): Boolean =
CrossVersion.partialVersion(scalaVersion) match {
Expand Down

0 comments on commit ed68f78

Please sign in to comment.