Skip to content

Commit

Permalink
Test Scala 3.3.1 opts
Browse files Browse the repository at this point in the history
  • Loading branch information
bcarter97 authored and TonioGela committed Mar 20, 2024
1 parent dc7cfa9 commit d4dd414
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ and Scala 3.x releases:
* 3.0.2
* 3.1.3
* 3.3.0
* 3.3.1

### Conduct

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ val Scala213 = "2.13.8"
val Scala30 = "3.0.2"
val Scala31 = "3.1.3"
val Scala33 = "3.3.0"
val Scala331 = "3.3.1"

crossScalaVersions := Seq(
Scala211,
Scala212,
Scala213,
Scala30,
Scala31,
Scala33
Scala33,
Scala331
)

Compile / tpolecatOptionsMode := CiMode
Expand Down
36 changes: 32 additions & 4 deletions plugin/src/sbt-test/sbt-tpolecat/scalacOptions/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ val Scala213 = "2.13.8"
val Scala30 = "3.0.2"
val Scala31 = "3.1.3"
val Scala33 = "3.3.0"
val Scala331 = "3.3.1"

enablePlugins(OtherPlugin)

Expand All @@ -17,7 +18,8 @@ crossScalaVersions := Seq(
Scala213,
Scala30,
Scala31,
Scala33
Scala33,
Scala331
)

tpolecatDevModeOptions ++= Set(
Expand Down Expand Up @@ -210,6 +212,28 @@ val Scala33Options =
"-source",
"3.0-migration"
)
val Scala331Options =
Seq(
"-encoding",
"utf8",
"-deprecation",
"-feature",
"-unchecked",
"-language:experimental.macros",
"-language:higherKinds",
"-language:implicitConversions",
"-Ykind-projector",
"-Wvalue-discard",
"-Wnonunit-statement",
"-Wunused:implicits",
"-Wunused:explicits",
"-Wunused:imports",
"-Wunused:locals",
"-Wunused:params",
"-Wunused:privates",
"-source",
"3.0-migration"
)

TaskKey[Unit]("checkDevMode") := {
val scalaV = scalaVersion.value
Expand All @@ -221,6 +245,7 @@ TaskKey[Unit]("checkDevMode") := {
case Scala30 => Scala30Options
case Scala31 => Scala31Options
case Scala33 => Scala33Options
case Scala331 => Scala331Options
}

val actualOptions = scalacOptions.value
Expand All @@ -238,6 +263,7 @@ TaskKey[Unit]("checkVerboseMode") := {
case Scala30 => Scala30Options ++ Seq("-explain")
case Scala31 => Scala31Options ++ Seq("-explain")
case Scala33 => Scala33Options ++ Seq("-explain")
case Scala331 => Scala331Options ++ Seq("-explain")
}

val actualOptions = scalacOptions.value
Expand All @@ -255,6 +281,7 @@ TaskKey[Unit]("checkCiMode") := {
case Scala30 => Scala30Options ++ Seq("-Xfatal-warnings")
case Scala31 => Scala31Options ++ Seq("-Xfatal-warnings")
case Scala33 => Scala33Options ++ Seq("-Xfatal-warnings")
case Scala331 => Scala331Options ++ Seq("-Xfatal-warnings")
}

val actualOptions = scalacOptions.value
Expand Down Expand Up @@ -293,9 +320,10 @@ TaskKey[Unit]("checkReleaseMode") := {
"-Ybackend-parallelism",
"8"
)
case Scala30 => Scala30Options ++ fatalWarnings ++ releaseOptions
case Scala31 => Scala31Options ++ fatalWarnings ++ releaseOptions
case Scala33 => Scala33Options ++ fatalWarnings ++ releaseOptions
case Scala30 => Scala30Options ++ fatalWarnings ++ releaseOptions
case Scala31 => Scala31Options ++ fatalWarnings ++ releaseOptions
case Scala33 => Scala33Options ++ fatalWarnings ++ releaseOptions
case Scala331 => Scala331Options ++ fatalWarnings ++ releaseOptions
}

val actualOptions = scalacOptions.value
Expand Down

0 comments on commit d4dd414

Please sign in to comment.