You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2026/06/16 04:03:56 UTC
[PR] fix: resolve all compiler warnings [pekko-persistence-r2dbc]
He-Pin opened a new pull request, #409:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/409
### Motivation
The project had several compiler warnings that cluttered build output:
an sbt lint warning about unused `previewPath` key, an existential type
feature warning in `ConnectionFactoryProvider`, a deprecation warning in
the Java DSL `R2dbcDurableStateStore`, and an annotation parsing warning
from the external r2dbc-spi dependency.
### Modification
- Add `Global / excludeLintKeys += previewPath` in build.sbt docs project
to suppress the sbt lint warning about the unused key
- Add `import scala.language.existentials` in `ConnectionFactoryProvider.scala`
to suppress the existential type feature warning
- Change javadsl `R2dbcDurableStateStore.deleteObject(persistenceId)` to
delegate to the non-deprecated `scalaStore.deleteObject(persistenceId,
revision = 0)` overload instead of the deprecated single-arg method
- Add `-Wconf:msg=could not find MAYBE in enum:s` for both Scala 2.13 and
Scala 3 in `CommonSettings.scala` to suppress the unfixable r2dbc-spi
annotation parsing warning
### Result
Clean compilation with zero warnings under both Scala 2.13 and Scala 3,
including when compiled with `-deprecation` and `-feature` flags.
### Tests
- `sbt "clean; compile"` - zero warnings
- `sbt` with `-deprecation -feature` flags - zero warnings
### References
None - compiler warning cleanup
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: resolve all compiler warnings [pekko-persistence-r2dbc]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #409:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/409#issuecomment-4717398696
maybe we should rebase this once #402 is merged
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: resolve all compiler warnings [pekko-persistence-r2dbc]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #409:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/409#issuecomment-4718231239
Done. Rebased onto main which includes #402. Also removed all formatting changes and the ConnectionFactoryProvider.scala change per review feedback. PR now only modifies build.sbt, CommonSettings.scala, and R2dbcDurableStateStore.scala.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: resolve all compiler warnings [pekko-persistence-r2dbc]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #409:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/409#discussion_r3420314533
##########
core/src/main/scala/org/apache/pekko/persistence/r2dbc/state/javadsl/R2dbcDurableStateStore.scala:
##########
@@ -52,7 +52,7 @@ class R2dbcDurableStateStore[A](scalaStore: ScalaR2dbcDurableStateStore[A])(impl
scalaStore.upsertObject(persistenceId, revision, value, tag).asJava
override def deleteObject(persistenceId: String): CompletionStage[Done] =
- scalaStore.deleteObject(persistenceId).asJava
+ scalaStore.deleteObject(persistenceId, revision = 0).asJava
Review Comment:
Kept as the deprecation fix — this was one of the valid compiler warning changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: resolve all compiler warnings [pekko-persistence-r2dbc]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #409:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/409#discussion_r3419834957
##########
core/src/main/scala/org/apache/pekko/persistence/r2dbc/state/javadsl/R2dbcDurableStateStore.scala:
##########
@@ -52,7 +52,7 @@ class R2dbcDurableStateStore[A](scalaStore: ScalaR2dbcDurableStateStore[A])(impl
scalaStore.upsertObject(persistenceId, revision, value, tag).asJava
override def deleteObject(persistenceId: String): CompletionStage[Done] =
- scalaStore.deleteObject(persistenceId).asJava
+ scalaStore.deleteObject(persistenceId, revision = 0).asJava
Review Comment:
one of the very few changes in this PR that are related to compiler warnings
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: resolve all compiler warnings [pekko-persistence-r2dbc]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #409:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/409#discussion_r3420312954
##########
docs/src/test/java/jdocs/home/state/BlogPost.java:
##########
@@ -23,9 +23,7 @@
import org.apache.pekko.persistence.typed.state.javadsl.DurableStateBehavior;
import org.apache.pekko.persistence.typed.state.javadsl.Effect;
-public class BlogPost
- extends DurableStateBehavior<
- BlogPost.Command, BlogPost.State> {
Review Comment:
Addressed. All formatting changes have been removed. The PR now only contains compiler warning fixes in build.sbt, CommonSettings.scala, and one deprecation fix in R2dbcDurableStateStore.scala.
##########
project/CommonSettings.scala:
##########
@@ -27,8 +27,11 @@ 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 ++= {
+ val commonWconf = Seq(
+ // r2dbc-spi annotation parsing warning - external dependency, cannot be fixed
+ "-Wconf:msg=could not find MAYBE in enum:s")
if (scalaBinaryVersion.value == "3")
- Seq(
+ commonWconf ++ Seq(
Review Comment:
Addressed. Removed the ConnectionFactoryProvider.scala change and all Java formatting changes. The PR now only modifies build.sbt, CommonSettings.scala (with `-language:existentials` and `-Wconf`), and one deprecation fix in R2dbcDurableStateStore.scala.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: resolve all compiler warnings [pekko-persistence-r2dbc]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #409:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/409#discussion_r3419829597
##########
project/CommonSettings.scala:
##########
@@ -27,8 +27,11 @@ 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 ++= {
+ val commonWconf = Seq(
+ // r2dbc-spi annotation parsing warning - external dependency, cannot be fixed
+ "-Wconf:msg=could not find MAYBE in enum:s")
if (scalaBinaryVersion.value == "3")
- Seq(
+ commonWconf ++ Seq(
Review Comment:
the changes in build.sbt and in this build scala seem to be the only changes needed in this PR - most of the PR changes are unrelated to compiler warnings
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: resolve all compiler warnings [pekko-persistence-r2dbc]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #409:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/409#discussion_r3419815749
##########
docs/src/test/java/jdocs/home/state/BlogPost.java:
##########
@@ -23,9 +23,7 @@
import org.apache.pekko.persistence.typed.state.javadsl.DurableStateBehavior;
import org.apache.pekko.persistence.typed.state.javadsl.Effect;
-public class BlogPost
- extends DurableStateBehavior<
- BlogPost.Command, BlogPost.State> {
Review Comment:
there is quite a lot of format changing in this PR, not just here but elsewhere
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: resolve all compiler warnings [pekko-persistence-r2dbc]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #409:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/409#discussion_r3419811294
##########
docs/src/test/java/jdocs/home/state/BlogPostCounts.java:
##########
@@ -7,13 +7,13 @@
* This file is part of the Apache Pekko project, which was derived from Akka.
*/
-/**
- * Copyright (C) 2022 Lightbend Inc. <https://www.lightbend.com>
- */
-
+/** Copyright (C) 2022 Lightbend Inc. <https://www.lightbend.com> */
Review Comment:
please don't change license headers
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: resolve all compiler warnings [pekko-persistence-r2dbc]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #409:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/409
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org