Skip to content
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

Adding play 3.0 support. Fixes #564 #565

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tardigradeus
Copy link

Pull Request Checklist

Fixes

Fixes #564

Purpose

This PR adds support for Play 3.0.

What does this PR do?

Background Context

Why did you take this approach?

The only files referencing akka was MongoController, so it was modified per version. The build.sbt was edited to pull the correct dependencies, inspired by the way it was done in reactivemongo-play-json build.sbt.

References

#564

@@ -20,8 +20,14 @@ object Common extends AutoPlugin {
driverVersion := {
val ver = (ThisBuild / version).value
val suffix = {
if (useShaded.value) "" // default ~> no suffix
else "noshaded"
val noshaded = "noshaded"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for such local "constant"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the local constant

} else {
("org.reactivemongo" %% "reactivemongo-pekkostream" % buildVer)
.cross(CrossVersion.binary)
.exclude("org.apache.pekko", "*") // provided by Play
Copy link
Member

@cchantep cchantep Apr 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think so

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you specify your comment ?

build.sbt Outdated
}

baseDeps
}

lazy val reactivemongo = Project("Play2-ReactiveMongo", file(".")).settings(
lazy val reactivemongo = Project("Play-ReactiveMongo", file(".")).settings(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it update the artifactId, it cannot be done as-is to keep compat

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reverted the naming of the project, However i don't know how you see the publishing of the play3 version. Should it be another subproject ? another git project ? maybe a dynamic naming of the artifact for publishing?

project/Common.scala Outdated Show resolved Hide resolved
project/Common.scala Outdated Show resolved Hide resolved
project/Common.scala Outdated Show resolved Hide resolved

import akka.stream.Materializer

object MongoController {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was no need for that, how is it related with support for Play 3?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MongoController Trait references akka dependencies in the signature of functions and needed to be changed to pekko.
I though that the best way of changing from akka to pekko was to split the trait into a version specific file, resulting in the duplication of the file for every version under play 3.0.

* Removing local constant
* Keep scala 2.12 as lower default
* Formatting
* Revert project name to Play2-ReactiveMongo
* Add test to the pipeline
project/Common.scala Outdated Show resolved Hide resolved
* Reverting the scala version from 3.3.3 to 3.2.2
@tardigradeus tardigradeus requested a review from cchantep May 3, 2024 22:35
@tardigradeus
Copy link
Author

Hi @cchantep, do you have any updates on this? Should I close the requested change once I believe it's completed and there are no further additions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Play 3.0 support
2 participants