When adding Scala 3 support to pekko-persistence-jdbc (see https://github.com/apache/incubator-pekko-persistence-jdbc/pull/44) using the newly release Slick Scala 3.5.0-M4 milestone which has Scala 3 support, any usage of Slick query (i.e. db.run(...) causes Scala 3 compiler to produce
[error] -- [E120] Naming Error: /Users/mdedetrich/github/incubator-pekko-persistence-jdbc/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/JdbcDurableStateStore.scala:201:20
[error] 201 | private[jdbc] def maxStateStoreOffset(): Future[Long] =
[error] | ^
[error] |Double definition:
[error] |private[jdbc] def maxStateStoreOffset(): concurrent.Future[Long] in class JdbcDurableStateStore at line 201 and
[error] |private[jdbc] def maxStateStoreOffset(): concurrent.Future[Long] in class JdbcDurableStateStore at line 201
[error] |have the same type after erasure.
[error] |
[error] |Consider adding a @targetName annotation to one of the conflicting definitions
[error] |for disambiguation.
As you can see in the source code there is clearly only a single definition and both claimed double definitions in the error message also report to the same single line.
It seems that Scala 3 in this case is somehow creating duplicated symbols which is giving the false error?
Compiler version
Scala 3.3.0
Minimized code
Minimizing this is going to take quite a lot of time so I am reporting it now incase it gives someone initial ideas as to what may be causing the problem but this is the smallest snippet of code producing the issue so far https://github.com/mdedetrich/incubator-pekko-persistence-jdbc/blob/112d67b765c59c36e2e39a8ce21ca410441b17c5/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/JdbcDurableStateStore.scala#L202-L203, i.e.
Output
When adding Scala 3 support to pekko-persistence-jdbc (see https://github.com/apache/incubator-pekko-persistence-jdbc/pull/44) using the newly release Slick Scala 3.5.0-M4 milestone which has Scala 3 support, any usage of Slick query (i.e.
db.run(...)
causes Scala 3 compiler to produceAs you can see in the source code there is clearly only a single definition and both claimed double definitions in the error message also report to the same single line.
It seems that Scala 3 in this case is somehow creating duplicated symbols which is giving the false error?
Expectation
For it to compile without errors