You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2026/06/14 11:54:20 UTC

(pekko-persistence-dynamodb) branch scala3-syntax created (now cd120bb)

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

He-Pin pushed a change to branch scala3-syntax
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-dynamodb.git


      at cd120bb  chore: Rewrite to scala3 syntax

This branch includes the following new commits:

     new cd120bb  chore: Rewrite to scala3 syntax

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org


(pekko-persistence-dynamodb) 01/01: chore: Rewrite to scala3 syntax

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit cd120bba79312114546ca0012ec19f4bd649237b
Author: 虎鸣 <he...@alibaba-inc.com>
AuthorDate: Sun Jun 14 19:54:13 2026 +0800

    chore: Rewrite to scala3 syntax
    
    Motivation:
    Let Scala 3 Community build compile pekko-persistence-dynamodb.
    
    Modification:
    Update .scalafmt.conf dialect to scala213source3 and enable
    scala3 syntax rewrite rules, then reformat all sources.
    
    Result:
    Wildcard types use ? syntax (e.g. Class[?] instead of Class[_]).
    
    Tests:
    Not run - formatting only
    
    References:
    Refs apache/pekko#3048
---
 .scalafmt.conf                                               | 12 +++++++++++-
 project/CopyrightHeader.scala                                |  6 +++---
 .../pekko/persistence/dynamodb/journal/DynamoDBHelper.scala  |  2 +-
 .../dynamodb/journal/DynamoDBIntegrationLoadSpec.scala       |  2 +-
 .../persistence/dynamodb/journal/FailureReportingSpec.scala  |  2 +-
 5 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/.scalafmt.conf b/.scalafmt.conf
index 0d9f269..4714569 100644
--- a/.scalafmt.conf
+++ b/.scalafmt.conf
@@ -1,5 +1,5 @@
 version                                  = 3.11.1
-runner.dialect                           = scala213
+runner.dialect                           = scala213source3
 project.git                              = true
 style                                    = defaultWithAlign
 docstrings.style                         = Asterisk
@@ -72,3 +72,13 @@ rewriteTokens          = {
   "←": "<-"
 }
 project.layout         = StandardConvention
+
+rewrite.scala3.convertToNewSyntax = true
+runner {
+  dialectOverride {
+    allowSignificantIndentation = false
+    allowAsForImportRename = false
+    allowStarWildcardImport = false
+    allowPostfixStarVarargSplices = false
+  }
+}
diff --git a/project/CopyrightHeader.scala b/project/CopyrightHeader.scala
index 3c26e4b..037cf70 100644
--- a/project/CopyrightHeader.scala
+++ b/project/CopyrightHeader.scala
@@ -22,7 +22,7 @@ trait CopyrightHeader extends AutoPlugin {
 
   override def trigger: PluginTrigger = allRequirements
 
-  protected def headerMappingSettings: Seq[Def.Setting[_]] =
+  protected def headerMappingSettings: Seq[Def.Setting[?]] =
     Seq(Compile, Test).flatMap { config =>
       inConfig(config)(
         Seq(
@@ -34,10 +34,10 @@ trait CopyrightHeader extends AutoPlugin {
             HeaderFileType("template") -> cStyleComment)))
     }
 
-  override def projectSettings: Seq[Def.Setting[_]] =
+  override def projectSettings: Seq[Def.Setting[?]] =
     Def.settings(headerMappingSettings, additional)
 
-  def additional: Seq[Def.Setting[_]] =
+  def additional: Seq[Def.Setting[?]] =
     Def.settings(Compile / compile := {
         (Compile / headerCreate).value
         (Compile / compile).value
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 f72b76a..6915d85 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
@@ -78,7 +78,7 @@ trait DynamoDBHelper {
   def setReporter(ref: ActorRef): Unit = reporter = ref
 
   private def send[In <: AmazonWebServiceRequest, Out](aws: In, func: AsyncHandler[In, Out] => juc.Future[Out])(implicit
-      d: Describe[_ >: In]): Future[Out] = {
+      d: Describe[? >: In]): Future[Out] = {
 
     def name = d.desc(aws)
 
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 82e0f55..4339f9b 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
@@ -53,7 +53,7 @@ pekko.persistence.snapshot-store.plugin = ""
     def receiveCommand: Receive = {
       case DeleteTo(sequenceNr) =>
         deleteMessages(sequenceNr)
-      case payload: List[_] =>
+      case payload: List[?] =>
         persistAll(payload)(handle)
     }
 
diff --git a/src/test/scala/org/apache/pekko/persistence/dynamodb/journal/FailureReportingSpec.scala b/src/test/scala/org/apache/pekko/persistence/dynamodb/journal/FailureReportingSpec.scala
index 210b602..4fd6d60 100644
--- a/src/test/scala/org/apache/pekko/persistence/dynamodb/journal/FailureReportingSpec.scala
+++ b/src/test/scala/org/apache/pekko/persistence/dynamodb/journal/FailureReportingSpec.scala
@@ -206,7 +206,7 @@ pekko.loggers = ["org.apache.pekko.testkit.TestEventListener"]
     "have sensible error messages" when {
       val evaluatedDynamo = dynamo
       import evaluatedDynamo._
-      def desc[T](aws: T)(implicit d: Describe[_ >: T]): String = d.desc(aws)
+      def desc[T](aws: T)(implicit d: Describe[? >: T]): String = d.desc(aws)
 
       val keyItem = Map(Key -> S("TheKey"), Sort -> N("42")).asJava
       val key2Item = Map(Key -> S("The2Key"), Sort -> N("43")).asJava


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org