Skip to content

Commit

Permalink
feat: r2dbc cross build for Scala 3 (#856)
Browse files Browse the repository at this point in the history
* remove unreachable case to avoid scala3 compile warning
  • Loading branch information
sebastian-alfers authored Apr 18, 2023
1 parent 9601677 commit 0366656
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ import java.time.{ Duration => JDuration }
import java.util.UUID
import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.atomic.AtomicInteger

import scala.annotation.tailrec
import scala.collection.immutable
import scala.concurrent.Await
import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.concurrent.duration._

import akka.Done
import akka.NotUsed
import akka.actor.testkit.typed.TestException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,6 @@ private[projection] class R2dbcOffsetStore(
case Some(r) => r.seqNr < inflightSeqNr
case None => true
}
case _ => true
}
if (newInflight.size >= 10000) {
throw new IllegalStateException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ object R2dbcProjectionDocExample {
}
//#grouped-handler

implicit val system = ActorSystem[Nothing](Behaviors.empty, "Example")
implicit val system: ActorSystem[Nothing] = ActorSystem(Behaviors.empty, "Example")
implicit val ec: ExecutionContext = system.executionContext

object IllustrateInit {
Expand Down
5 changes: 2 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,13 @@ lazy val grpcTests =
// provides offset storage backed by akka-persistence-r2dbc
lazy val r2dbc =
Project(id = "akka-projection-r2dbc", base = file("akka-projection-r2dbc"))
.configs(IntegrationTest)
// .settings(Scala3.settings) FIXME can be done once r2dbc 1.1.0 is out
.configs(IntegrationTest.extend(Test))
.settings(Scala3.settings)
.settings(headerSettings(IntegrationTest))
.settings(Defaults.itSettings)
.settings(Dependencies.r2dbc)
.dependsOn(core, grpc, eventsourced, `durable-state`)
.dependsOn(testkit % Test)
.dependsOn(slick % "test->test;it->it")

lazy val examples = project
.configs(IntegrationTest.extend(Test))
Expand Down

0 comments on commit 0366656

Please sign in to comment.