Skip to content

Commit

Permalink
Upgrades scala 2&3 and sbt (#1779)
Browse files Browse the repository at this point in the history
* Upgrades scala 2&3 and sbt

* Disables fatal warnings in rpc-service

* Disables fatal warnings in somo other modules

* Disables fatal warnings in test modules
  • Loading branch information
juanpedromoreno authored May 15, 2024
1 parent f7a3e4c commit af3a13f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val scala213 = "2.13.12"
val scala3 = "3.3.3"
val scala213 = "2.13.14"
val scala3 = "3.4.1"

ThisBuild / organization := "io.higherkindness"
ThisBuild / githubOrganization := "47degrees"
Expand Down
21 changes: 15 additions & 6 deletions project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ object ProjectPlugin extends AutoPlugin {
libraryDependencies ++= scalaVersionSpecificDeps(3)(
"com.sksamuel.avro4s" %% "avro4s-core" % "5.0.9"
).value,
scalacOptions --= on(2, 13)("-Wunused:patvars").value
scalacOptions --= on(2, 13)("-Wunused:patvars").value,
scalacOptions --= on(3, 4)("-Xfatal-warnings").value
)

lazy val macroSettings: Seq[Setting[_]] = Seq(
Expand All @@ -83,7 +84,8 @@ object ProjectPlugin extends AutoPlugin {
lazy val clientNettySettings: Seq[Def.Setting[_]] = Seq(
libraryDependencies ++= Seq(
"io.grpc" % "grpc-netty" % V.grpc
)
),
scalacOptions --= on(3, 4)("-Xfatal-warnings").value
)

lazy val clientOkHttpSettings: Seq[Def.Setting[_]] = Seq(
Expand All @@ -105,13 +107,15 @@ object ProjectPlugin extends AutoPlugin {
"org.typelevel" %% "cats-effect" % V.catsEffect
),
muSrcGenIdlType := IdlType.Proto,
scalacOptions += "-Wconf:src=src_managed/.*:silent"
scalacOptions += "-Wconf:src=src_managed/.*:silent",
scalacOptions --= on(3, 4)("-Xfatal-warnings").value
)

lazy val serverSettings: Seq[Def.Setting[_]] = Seq(
libraryDependencies ++= Seq(
"io.grpc" % "grpc-netty" % V.grpc
)
),
scalacOptions --= on(3, 4)("-Xfatal-warnings").value
)

lazy val configSettings: Seq[Def.Setting[_]] = Seq(
Expand All @@ -127,7 +131,8 @@ object ProjectPlugin extends AutoPlugin {
lazy val prometheusMetricsSettings: Seq[Def.Setting[_]] = Seq(
libraryDependencies ++= Seq(
"io.prometheus" % "simpleclient" % V.prometheus
)
),
scalacOptions --= on(3, 4)("-Xfatal-warnings").value
)

lazy val dropwizardMetricsSettings: Seq[Def.Setting[_]] = Seq(
Expand Down Expand Up @@ -209,6 +214,7 @@ object ProjectPlugin extends AutoPlugin {
publishArtifact := false,
Test / parallelExecution := false,
testFrameworks += new TestFramework("munit.Framework"),
scalacOptions -= "-Xfatal-warnings",
libraryDependencies ++= Seq(
"io.grpc" % "grpc-core" % V.grpc,
"org.scalameta" %% "munit-scalacheck" % V.munit,
Expand All @@ -219,6 +225,7 @@ object ProjectPlugin extends AutoPlugin {
publishArtifact := false,
Test / parallelExecution := false,
testFrameworks += new TestFramework("munit.Framework"),
scalacOptions -= "-Xfatal-warnings",
libraryDependencies ++= Seq(
"io.grpc" % "grpc-netty" % V.grpc % Test,
"io.netty" % "netty-tcnative-boringssl-static" % V.nettySSL % Test,
Expand All @@ -235,7 +242,8 @@ object ProjectPlugin extends AutoPlugin {

lazy val protobufSrcGenSettings = Seq(
muSrcGenIdlType := IdlType.Proto,
scalacOptions += "-Wconf:src=src_managed/.*:silent"
scalacOptions += "-Wconf:src=src_managed/.*:silent",
scalacOptions --= on(3, 4)("-Xfatal-warnings").value
)

lazy val protobufRPCTestSettings = testSettings ++ protobufSrcGenSettings
Expand All @@ -261,6 +269,7 @@ object ProjectPlugin extends AutoPlugin {
lazy val haskellIntegrationTestSettings = Seq(
publishArtifact := false,
Test / parallelExecution := false,
scalacOptions -= "-Xfatal-warnings",
libraryDependencies ++= Seq(
"co.fs2" %% "fs2-core" % V.fs2,
"org.scalameta" %% "munit" % V.munit % Test,
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.9.9
sbt.version = 1.10.0

0 comments on commit af3a13f

Please sign in to comment.