From fbbf0a05c48c2baa0fc785814796310ef47a6fea Mon Sep 17 00:00:00 2001 From: Mikel Anabitarte Date: Sun, 13 Nov 2022 19:12:40 +0100 Subject: [PATCH 1/2] Mongo: Update to latest driver, which adds full support for MongoDB 6.0 --- project/Dependencies.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 547a3d962d..dd0bc27ae1 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -360,7 +360,7 @@ object Dependencies { val MongoDb = Seq( libraryDependencies ++= Seq( - "org.mongodb.scala" %% "mongo-scala-driver" % "4.4.0" // ApacheV2 + "org.mongodb.scala" %% "mongo-scala-driver" % "4.7.2" // ApacheV2 ) ) From d066d2aad6cfde64dc326b454471dc4b44a58f75 Mon Sep 17 00:00:00 2001 From: Mikel Anabitarte Date: Tue, 15 Nov 2022 17:34:47 +0100 Subject: [PATCH 2/2] Mongo: Remove warnings that do not apply anymore --- mongodb/src/test/scala/docs/scaladsl/MongoSinkSpec.scala | 6 +----- mongodb/src/test/scala/docs/scaladsl/MongoSourceSpec.scala | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/mongodb/src/test/scala/docs/scaladsl/MongoSinkSpec.scala b/mongodb/src/test/scala/docs/scaladsl/MongoSinkSpec.scala index 74ea315602..ba7073c9dc 100644 --- a/mongodb/src/test/scala/docs/scaladsl/MongoSinkSpec.scala +++ b/mongodb/src/test/scala/docs/scaladsl/MongoSinkSpec.scala @@ -24,8 +24,6 @@ import scala.concurrent.duration._ import org.scalatest.matchers.must.Matchers import org.scalatest.wordspec.AnyWordSpec -import scala.annotation.nowarn - class MongoSinkSpec extends AnyWordSpec with ScalaFutures @@ -39,9 +37,7 @@ class MongoSinkSpec case class DomainObject(_id: Int, firstProperty: String, secondProperty: String) val codecRegistry = - fromRegistries(fromProviders(classOf[Number], classOf[DomainObject]), DEFAULT_CODEC_REGISTRY): @nowarn( - "msg=match may not be exhaustive" - ) + fromRegistries(fromProviders(classOf[Number], classOf[DomainObject]), DEFAULT_CODEC_REGISTRY) implicit val system = ActorSystem() diff --git a/mongodb/src/test/scala/docs/scaladsl/MongoSourceSpec.scala b/mongodb/src/test/scala/docs/scaladsl/MongoSourceSpec.scala index 4206433953..1626512e68 100644 --- a/mongodb/src/test/scala/docs/scaladsl/MongoSourceSpec.scala +++ b/mongodb/src/test/scala/docs/scaladsl/MongoSourceSpec.scala @@ -22,8 +22,6 @@ import scala.concurrent.duration._ import org.scalatest.matchers.must.Matchers import org.scalatest.wordspec.AnyWordSpec -import scala.annotation.nowarn - class MongoSourceSpec extends AnyWordSpec with ScalaFutures @@ -51,7 +49,7 @@ class MongoSourceSpec import org.mongodb.scala.bson.codecs.Macros._ val codecRegistry = - fromRegistries(fromProviders(classOf[Number]: @nowarn("msg=match may not be exhaustive")), DEFAULT_CODEC_REGISTRY) + fromRegistries(fromProviders(classOf[Number]), DEFAULT_CODEC_REGISTRY) // #codecs // #init-connection