From 14fbc2d79e76230ced8d00d0c54a4c44cc10b647 Mon Sep 17 00:00:00 2001 From: Kirill Shelopugin Date: Tue, 29 Oct 2024 13:45:52 +0100 Subject: [PATCH] Update kafka-journal to 4.1.1 (#646) * Update kafka-journal to 4.1.1 * update scala to 2.13.15 * update sbt-scoverage to 2.2.2 * update sbt-scoverage to 2.2.2 * add nowarn to work around the compiler weird behaviour * add nowarn to work around the compiler weird behaviour --- build.sbt | 3 +-- .../main/scala/com/evolutiongaming/kafka/flow/TopicFlow.scala | 2 ++ .../kafka/flow/registry/EntityRegistryTest.scala | 2 ++ .../scala/com/evolutiongaming/kafka/flow/FlowMetrics.scala | 2 ++ .../scala/com/evolutiongaming/kafka/flow/RemapKeySpec.scala | 2 +- project/Dependencies.scala | 2 +- project/plugins.sbt | 2 +- 7 files changed, 10 insertions(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index cf8d2972..a195a103 100644 --- a/build.sbt +++ b/build.sbt @@ -11,7 +11,7 @@ lazy val commonSettings = Seq( organizationName := "Evolution Gaming", organizationHomepage := Some(url("https://evolution.com/")), publishTo := Some(Resolver.evolutionReleases), - scalaVersion := "2.13.14", + scalaVersion := "2.13.15", licenses := Seq(("MIT", url("https://opensource.org/licenses/MIT"))), testFrameworks += new TestFramework("munit.Framework"), testOptions += Tests.Argument(new TestFramework("munit.Framework"), "+l"), @@ -21,7 +21,6 @@ lazy val commonSettings = Seq( "org.scala-lang.modules" %% "scala-java8-compat" % "always" ), addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.3" cross CrossVersion.full), - coverageScalacPluginVersion := "2.2.0", ) lazy val root = (project in file(".")) diff --git a/core/src/main/scala/com/evolutiongaming/kafka/flow/TopicFlow.scala b/core/src/main/scala/com/evolutiongaming/kafka/flow/TopicFlow.scala index 9d4348ab..29547ea4 100644 --- a/core/src/main/scala/com/evolutiongaming/kafka/flow/TopicFlow.scala +++ b/core/src/main/scala/com/evolutiongaming/kafka/flow/TopicFlow.scala @@ -15,6 +15,7 @@ import com.evolutiongaming.skafka.consumer.ConsumerRecords import scodec.bits.ByteVector import scala.collection.immutable.SortedSet +import scala.annotation.nowarn trait TopicFlow[F[_]] { @@ -81,6 +82,7 @@ object TopicFlow { val acquire = new TopicFlow[F] { + @nowarn("cat=unused") // for some reason compiler thinks that `flow` and `partitionRecords` are unused def apply(records: ConsumerRecords[String, ByteVector]) = { for { diff --git a/core/src/test/scala/com/evolutiongaming/kafka/flow/registry/EntityRegistryTest.scala b/core/src/test/scala/com/evolutiongaming/kafka/flow/registry/EntityRegistryTest.scala index ff72f97d..b3ed61f1 100644 --- a/core/src/test/scala/com/evolutiongaming/kafka/flow/registry/EntityRegistryTest.scala +++ b/core/src/test/scala/com/evolutiongaming/kafka/flow/registry/EntityRegistryTest.scala @@ -14,7 +14,9 @@ import munit.FunSuite import scodec.bits.ByteVector import java.nio.charset.StandardCharsets +import scala.annotation.nowarn +@nowarn("cat=unused") // for some reason compiler thinks that values in the test are unused class EntityRegistryTest extends FunSuite { implicit val logOf: LogOf[IO] = LogOf.empty[IO] implicit val log: Log[IO] = Log.empty[IO] diff --git a/metrics/src/main/scala/com/evolutiongaming/kafka/flow/FlowMetrics.scala b/metrics/src/main/scala/com/evolutiongaming/kafka/flow/FlowMetrics.scala index 532a09b1..e7fa1d63 100644 --- a/metrics/src/main/scala/com/evolutiongaming/kafka/flow/FlowMetrics.scala +++ b/metrics/src/main/scala/com/evolutiongaming/kafka/flow/FlowMetrics.scala @@ -19,6 +19,7 @@ import com.evolutiongaming.kafka.flow.snapshot.SnapshotDatabaseMetrics._ import com.evolutiongaming.skafka.consumer.ConsumerRecord import com.evolutiongaming.smetrics.CollectorRegistry import scodec.bits.ByteVector +import scala.annotation.nowarn trait FlowMetrics[F[_]] { @@ -39,6 +40,7 @@ object FlowMetrics { def apply[F[_]](implicit F: FlowMetrics[F]): FlowMetrics[F] = F + @nowarn("cat=unused") // for some reason compiler thinks that `persistentModule` is unused def of[F[_]: Monad: MeasureDuration](registry: CollectorRegistry[F]): Resource[F, FlowMetrics[F]] = for { keyDatabase <- keyDatabaseMetricsOf[F].apply(registry) journalDatabase <- journalDatabaseMetricsOf[F].apply(registry) diff --git a/persistence-kafka-it-tests/src/test/scala/com/evolutiongaming/kafka/flow/RemapKeySpec.scala b/persistence-kafka-it-tests/src/test/scala/com/evolutiongaming/kafka/flow/RemapKeySpec.scala index c658c135..e3dd7943 100644 --- a/persistence-kafka-it-tests/src/test/scala/com/evolutiongaming/kafka/flow/RemapKeySpec.scala +++ b/persistence-kafka-it-tests/src/test/scala/com/evolutiongaming/kafka/flow/RemapKeySpec.scala @@ -201,7 +201,7 @@ class RemapKeySpec extends ForAllKafkaSuite { FoldOption.of { (state, record) => for { input <- IO(record.value.get.value.decodeUtf8.toOption.get) - key = record.key.get.value + _ = record.key.get.value newState = state.fold(input)(_ + input) } yield newState.some } diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 511ec179..9dbd3efd 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -20,7 +20,7 @@ object Dependencies { } object KafkaJournal { - private val version = "4.1.0" + private val version = "4.1.1" val journal = "com.evolutiongaming" %% "kafka-journal" % version val cassandra = "com.evolutiongaming" %% "kafka-journal-eventual-cassandra" % version val persistence = "com.evolutiongaming" %% "kafka-journal-persistence" % version diff --git a/project/plugins.sbt b/project/plugins.sbt index 8e575275..dacd4c8f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ libraryDependencySchemes ++= Seq( "org.scala-lang.modules" %% "scala-xml" % "always" ) -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.2") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11")