-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scala 3 support #775
Scala 3 support #775
Conversation
Hi @jtjeferreira, Thank you for your contribution! We really value the time you've taken to put this together. We see that you have signed the Lightbend Contributors License Agreement before, however, the CLA has changed since you last signed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need a non-milestone Slick release before we can merge this to main. Good to have this prepared once that arrives though! 👍
Hey @jtjeferreira any chance you have time to rebase on master to solve the conflict so we can see if Slick 3.5.0 RC1 works? |
I tried the "Resolve Conflicts" from the GitHub UI on my phone and the conflict seems simple. I will have a look tomorrow... |
I fixed the conflicts. Can you approve the workflows? PS: There is a test that will fail, due to a compiler bug
I will push the fix after so we can have proof of the bug (and the bugfix) |
Thanks for approving the workflows. There are 2 issues:
|
I pushed a commit adding Test/compile on Scala 3 to CI PR validation now. There are some related failures to look into - methods that end up with the same signature after erasure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far! Some smaller things and the conflicting overloads and this is as ready as it gets until slick 3.5.0 is released 👍
core/src/main/mima-filters/5.4.0.backwards.excludes/issue-775-slick-3.50.excludes
Show resolved
Hide resolved
|
||
ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.persistence.jdbc.db.SlickDatabase.forConfig") | ||
ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.persistence.jdbc.db.SlickDatabase.database") | ||
ProblemFilters.exclude[ReversedMissingMethodProblem]("akka.persistence.jdbc.db.SlickDatabase.database") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SlickDatabase
already is internal, so this is fine
ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.persistence.jdbc.snapshot.dao.DefaultSnapshotDao.this") | ||
ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.persistence.jdbc.snapshot.dao.legacy.ByteArraySnapshotDao.this") | ||
ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.persistence.jdbc.state.JdbcDurableStateStoreProvider.db") | ||
ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.persistence.jdbc.state.scaladsl.JdbcDurableStateStore.this") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both fine to exclude:
Constructor isn't used by user code (instantiated by akka-persistence). A bit curious that it shows up, I can't see that it wasn't touched for any of the listed types though.
db
field shouldn't ever be touched by user code, effectively protected.
|
||
override val javadslReadJournal = new javadsl.JdbcReadJournal(scaladslReadJournal) | ||
override def javadslReadJournal(): javadsl.JdbcReadJournal = new javadsl.JdbcReadJournal(scaladslReadJournal()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The returned instances are cached and shared by akka-persistence internals so this change is fine. 👍
def addRange(from: OrderingId, until: OrderingId): MissingElements = { | ||
val newRange = from.until(until) | ||
MissingElements(elements :+ newRange) | ||
} | ||
def contains(id: OrderingId): Boolean = elements.exists(_.containsTyped(id)) | ||
def isEmpty: Boolean = elements.forall(_.isEmpty) | ||
} | ||
private object MissingElements { | ||
object MissingElements { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the multi-param JournalSequenceActor.receive(currentMaxOrdering ...)
private instead of changing these (it's an internal factory for Receive
instances, not called from the outside)
@@ -46,7 +46,7 @@ import akka.annotation.InternalApi | |||
* Efficient representation of missing elements using NumericRanges. | |||
* It can be seen as a collection of GlobalOffset | |||
*/ | |||
private case class MissingElements(elements: Seq[NumericRange[GlobalOffset]]) { | |||
case class MissingElements(elements: Seq[NumericRange[GlobalOffset]]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, make the method private instead
Thanks
I have seen that error locally. If I comment the |
Sounds like that, removing that annotation and adding Scaladoc saying it "API may change" is fine IMO |
Meanwhile, I found a workaround (see 45bbe4a). I think I addressed all your feedback and also fixed mima after e6422a4 |
Even better 👍 |
…ing persisted when the query is executed" increase toStrict timeout
Regarding the failure in I fixed it with 7199f96, but I wonder if this is a problem with slick 3.5.0... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the good work @jtjeferreira !
Thanks. Looking forward for a release |
Looks like there is a problem in docs https://github.com/akka/akka-persistence-jdbc/actions/runs/8201918926/job/22431619062:
|
Adds scala 3 support