This is an automated email from the ASF dual-hosted git repository.

He-Pin pushed a commit to branch scala39-compat
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-dynamodb.git

commit d0b52123cda8b75e69576de1303ad98901cf09b8
Author: 虎鸣 <[email protected]>
AuthorDate: Mon Jun 15 01:46:43 2026 +0800

    feat: improve Scala 3.8 forward compatibility
    
    Motivation:
    Scala 3.8 introduces new warnings and deprecations that will become
    errors in future versions. Preparing the codebase for smooth upgrades.
    
    Modification:
    - Replace `= _` with `= null` in 3 locations (deprecated in 3.8)
    - Add -Wconf suppressions for warnings requiring Scala 3-only syntax
    
    Result:
    Zero new warnings when compiled with Scala 3.8.4, while maintaining
    full cross-compilation with Scala 2.13 and 3.3.x.
---
 build.sbt                                                    | 12 +++++++++++-
 .../pekko/persistence/dynamodb/journal/DynamoDBHelper.scala  |  2 +-
 .../dynamodb/journal/DynamoDBIntegrationLoadSpec.scala       |  2 +-
 .../persistence/dynamodb/snapshot/SnapshotTooBigSpec.scala   |  2 +-
 4 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/build.sbt b/build.sbt
index a755725..12fdb38 100644
--- a/build.sbt
+++ b/build.sbt
@@ -58,7 +58,17 @@ lazy val root = Project(
       "com.dimafeng" %% "testcontainers-scala-scalatest" % 
testcontainersScalaVersion % Test),
     scalacOptions ++= Seq("-deprecation", "-feature"),
     scalacOptions ++= {
-      if (scalaBinaryVersion.value == "3") Seq("-Yfuture-lazy-vals", 
"-release:17")
+      if (scalaBinaryVersion.value == "3")
+        Seq(
+          "-Yfuture-lazy-vals",
+          "-release:17",
+          "-Wconf:msg=Implicit parameters should be provided with a `using` 
clause:s",
+          "-Wconf:msg=is deprecated for wildcard arguments of types:s",
+          "-Wconf:msg=The trailing ` _` for eta-expansion is unnecessary:s",
+          "-Wconf:msg=with as a type operator has been deprecated:s",
+          "-Wconf:msg=Unreachable case except for null:s",
+          "-Wconf:msg=is no longer supported for vararg splices:s",
+          "-Wconf:msg=bad option.*-Yfuture-lazy-vals:s")
       else Seq.empty
     },
     Test / parallelExecution := false,
diff --git 
a/src/main/scala/org/apache/pekko/persistence/dynamodb/journal/DynamoDBHelper.scala
 
b/src/main/scala/org/apache/pekko/persistence/dynamodb/journal/DynamoDBHelper.scala
index 6915d85..7044836 100644
--- 
a/src/main/scala/org/apache/pekko/persistence/dynamodb/journal/DynamoDBHelper.scala
+++ 
b/src/main/scala/org/apache/pekko/persistence/dynamodb/journal/DynamoDBHelper.scala
@@ -74,7 +74,7 @@ trait DynamoDBHelper {
 
   def shutdown(): Unit = dynamoDB.shutdown()
 
-  private var reporter: ActorRef = _
+  private var reporter: ActorRef = null
   def setReporter(ref: ActorRef): Unit = reporter = ref
 
   private def send[In <: AmazonWebServiceRequest, Out](aws: In, func: 
AsyncHandler[In, Out] => juc.Future[Out])(implicit
diff --git 
a/src/test/scala/org/apache/pekko/persistence/dynamodb/journal/DynamoDBIntegrationLoadSpec.scala
 
b/src/test/scala/org/apache/pekko/persistence/dynamodb/journal/DynamoDBIntegrationLoadSpec.scala
index 4339f9b..4766269 100644
--- 
a/src/test/scala/org/apache/pekko/persistence/dynamodb/journal/DynamoDBIntegrationLoadSpec.scala
+++ 
b/src/test/scala/org/apache/pekko/persistence/dynamodb/journal/DynamoDBIntegrationLoadSpec.scala
@@ -84,7 +84,7 @@ pekko.persistence.snapshot-store.plugin = ""
   }
 
   class ProcessorC(val persistenceId: String, probe: ActorRef) extends 
PersistentActor {
-    var last: String = _
+    var last: String = null
 
     def receiveRecover: Receive = {
       case SnapshotOffer(_, snapshot: String) =>
diff --git 
a/src/test/scala/org/apache/pekko/persistence/dynamodb/snapshot/SnapshotTooBigSpec.scala
 
b/src/test/scala/org/apache/pekko/persistence/dynamodb/snapshot/SnapshotTooBigSpec.scala
index 3409718..df17f9b 100644
--- 
a/src/test/scala/org/apache/pekko/persistence/dynamodb/snapshot/SnapshotTooBigSpec.scala
+++ 
b/src/test/scala/org/apache/pekko/persistence/dynamodb/snapshot/SnapshotTooBigSpec.scala
@@ -50,7 +50,7 @@ class SnapshotTooBigSpec extends 
TestKit(ActorSystem("SnapshotTooBigSpec"))
     client.shutdown()
   }
 
-  private var senderProbe: TestProbe = _
+  private var senderProbe: TestProbe = null
   val persistenceId = "SnapshotTooBigSpec"
   val snapshotStore = Persistence(system).snapshotStoreFor("")
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to