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

Cross-build to Scala 3 #557

Merged
merged 11 commits into from
Jan 21, 2021
Merged

Cross-build to Scala 3 #557

merged 11 commits into from
Jan 21, 2021

Conversation

dwijnand
Copy link
Member

Fixes #539

@dwijnand dwijnand force-pushed the scala3 branch 4 times, most recently from 0c745b5 to dbd8dd7 Compare January 11, 2021 10:07
@dwijnand dwijnand force-pushed the scala3 branch 6 times, most recently from 645d087 to 5821997 Compare January 12, 2021 08:31
@dwijnand dwijnand marked this pull request as ready for review January 12, 2021 09:02
@dwijnand dwijnand force-pushed the scala3 branch 6 times, most recently from e98f0e5 to d2d9a46 Compare January 12, 2021 16:35
@dwijnand
Copy link
Member Author

Ready for review @marcospereira @ennru @raboof @cchantep @jtjeferreira @ignasi35 @octonato. I'd like to release this sooner rather than later to give users (e.g. #539 @rossabaker in http4s) a chance to test Scala 3 before 3.0 is released (ideally before its RC1 is released).

@dwijnand
Copy link
Member Author

Let me know if you prefer a video call so I can run you through the PR, answer any concerns, clarify things and take feedback.

Copy link
Contributor

@jtjeferreira jtjeferreira left a comment

Choose a reason for hiding this comment

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

LGTM. I didn't finish looking into all files, but left some comments

dwijnand and others added 2 commits January 13, 2021 11:00
Co-authored-by: João Ferreira <jtjeferreira@gmail.com>
Copy link
Member

@cchantep cchantep left a comment

Choose a reason for hiding this comment

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

Lot of work 👍
Have some questions.

build.sbt Show resolved Hide resolved
build.sbt Show resolved Hide resolved
build.sbt Show resolved Hide resolved
build.sbt Outdated Show resolved Hide resolved
Co-authored-by: Cédric Chantepie <cchantep@users.noreply.github.com>
Copy link
Member Author

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

Thanks for the thorough review, @cchantep! Sorry I missed the notification yesterday.

// Each JSON objects is marked with the admTpe, ...
discriminator = "admTpe",
// ... indicating the lower-cased name of sub-type
typeNaming = JsonNaming { fullName =>
Copy link
Member Author

Choose a reason for hiding this comment

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

Needed change because of a limitation in Dotty's typeclass derivation: scala/scala3#11048. You can also see a reference to that ticket in this diff.

build.sbt Show resolved Hide resolved
// Each JSON objects is marked with the admTpe, ...
discriminator = "admTpe",
// ... indicating the lower-cased name of sub-type
typeNaming = JsonNaming { fullName =>
Copy link
Member

@cchantep cchantep Jan 15, 2021

Choose a reason for hiding this comment

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

Meaning there is a regression for the existing Scala 2 play-json?

@@ -55,7 +55,7 @@ class JsonSpec extends org.specs2.mutable.Specification {
)
)
.inmap(optopt => optopt.flatten, (opt: Option[Date]) => Some(opt))
)(Post, unlift(Post.unapply))
)(Post.apply, p => (p.body, p.created_at))
Copy link
Member

Choose a reason for hiding this comment

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

Ok but it should be kept until next major release for the Scala 2 version?

@dwijnand
Copy link
Member Author

Please let me know if there's any remaining feedback that needs to be addressed, otherwise I would like to merge and release this week.

Copy link
Contributor

@jtjeferreira jtjeferreira left a comment

Choose a reason for hiding this comment

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

LGTM for releasing an RC to unblock upstream users.

However I think we should try to find a way to solve https://github.com/playframework/play-json/pull/557/files#r559527225 otherwise it is another pain in the future dotty migration for users.

@dwijnand dwijnand merged commit a4772da into playframework:master Jan 21, 2021
@dwijnand dwijnand deleted the scala3 branch January 21, 2021 08:46
"EnumFormat" should {
import TestEnums.EnumWithDefaultNames._

// https://gitter.im/lampepfl/dotty?at=5ee22d1e7b6da9126a8b4a51 ¯\_(ツ)_/¯
Copy link
Member

Choose a reason for hiding this comment

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

Not sure what was hiding behind this link, however with Scala 3 things now work again, see #848

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.

Scala 3 crossbuilds
4 participants