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-r2dbc.git
commit 786ee024da5df39abfb173dc714c74ce2d5e5f14 Author: 虎鸣 <[email protected]> AuthorDate: Mon Jun 15 01:41:29 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 ContinuousQuery.scala (deprecated in 3.8) - Add -Wconf suppressions for warnings requiring Scala 3-only syntax (using clauses, wildcard types, eta-expansion, with operator, etc.) Result: Zero new warnings when compiled with Scala 3.8.4, while maintaining full cross-compilation with Scala 2.13 and 3.3.x. --- .../pekko/persistence/r2dbc/internal/ContinuousQuery.scala | 2 +- project/CommonSettings.scala | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/core/src/main/scala/org/apache/pekko/persistence/r2dbc/internal/ContinuousQuery.scala b/core/src/main/scala/org/apache/pekko/persistence/r2dbc/internal/ContinuousQuery.scala index a0b1ae4..de561e4 100644 --- a/core/src/main/scala/org/apache/pekko/persistence/r2dbc/internal/ContinuousQuery.scala +++ b/core/src/main/scala/org/apache/pekko/persistence/r2dbc/internal/ContinuousQuery.scala @@ -86,7 +86,7 @@ final private[r2dbc] class ContinuousQuery[S, T]( override def createLogic(inheritedAttributes: Attributes): GraphStageLogic = new TimerGraphStageLogicWithLogging(shape) with OutHandler { var nextRow: OptionVal[T] = OptionVal.none[T] - var sinkIn: SubSinkInlet[T] = _ + var sinkIn: SubSinkInlet[T] = null var state = initialState var nrElements = Long.MaxValue var subStreamFinished = false diff --git a/project/CommonSettings.scala b/project/CommonSettings.scala index d5e6d64..5722aea 100644 --- a/project/CommonSettings.scala +++ b/project/CommonSettings.scala @@ -27,7 +27,17 @@ object CommonSettings extends AutoPlugin { // Setting javac options in common allows IntelliJ IDEA to import them automatically Compile / javacOptions ++= Seq("-encoding", "UTF-8", "--release", "17"), 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 / logBuffered := false, --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
