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

Upgrade Play & Play JSON to 3.0 #381

Merged
merged 5 commits into from
Nov 12, 2023
Merged

Upgrade Play & Play JSON to 3.0 #381

merged 5 commits into from
Nov 12, 2023

Conversation

gaeljw
Copy link
Contributor

@gaeljw gaeljw commented Nov 4, 2023

Supersedes #380

  • Play JSON 3.0 is identical to Play JSON 2.10.1 playframework/play-json@2.10.1...3.0.0, it's only a groupId renaming of the artifact (com.typesafe.play -> org.playframework)
  • Play 3.0 brings new features/bugfixes, drop support for Scala 2.12 and uses Pekko instead of Akka (though it seems to me that enumeratum code is unrelated to Pekko/Akka)

As discussed in #380, Play 2.x support is discontinued in favour of Play 3.x unless there is a strong demand for it.

Closes #382

scalaVersion := scala_2_13Version,
crossScalaVersions := Seq(scala_2_13Version, scala_3Version),
libraryDependencies += ("org.playframework" %% "play" % "3.0.0")
.exclude("org.scala-lang.modules", "*"),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lloydmeta It's not clear to me why the exclude("org.scala-lang.modules", "*") is present, I kept it in doubt but maybe it's not needed anymore?

@gaeljw
Copy link
Contributor Author

gaeljw commented Nov 4, 2023

I don't understand why 2.12 build fails but for sure it's related to my attempt to not build enumeratum-play for 2.12 anymore. Will investigate a bit more tomorrow. Unless you've got any idea.

@gaeljw gaeljw changed the title Upgrade Play & Play JSON to 3.0 WIP: Upgrade Play & Play JSON to 3.0 Nov 5, 2023
@gaeljw gaeljw changed the title WIP: Upgrade Play & Play JSON to 3.0 draft: Upgrade Play & Play JSON to 3.0 Nov 5, 2023
@gaeljw gaeljw changed the title draft: Upgrade Play & Play JSON to 3.0 WIP: Upgrade Play & Play JSON to 3.0 Nov 5, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2023

Codecov Report

Merging #381 (6b0828e) into master (dba1630) will increase coverage by 0.19%.
The diff coverage is n/a.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##           master     #381      +/-   ##
==========================================
+ Coverage   85.52%   85.71%   +0.19%     
==========================================
  Files          65       63       -2     
  Lines         518      511       -7     
  Branches       31       34       +3     
==========================================
- Hits          443      438       -5     
+ Misses         75       73       -2     

see 5 files with indirect coverage changes

@gaeljw gaeljw changed the title WIP: Upgrade Play & Play JSON to 3.0 Upgrade Play & Play JSON to 3.0 Nov 5, 2023
@gaeljw gaeljw changed the title Upgrade Play & Play JSON to 3.0 WIP: Upgrade Play & Play JSON to 3.0 Nov 5, 2023
@gaeljw gaeljw marked this pull request as draft November 5, 2023 15:33
@gaeljw gaeljw changed the title WIP: Upgrade Play & Play JSON to 3.0 Upgrade Play & Play JSON to 3.0 Nov 5, 2023
@gaeljw
Copy link
Contributor Author

gaeljw commented Nov 5, 2023

I don't understand why 2.12 build fails but for sure it's related to my attempt to not build enumeratum-play for 2.12 anymore. Will investigate a bit more tomorrow. Unless you've got any idea.

Wow.. this was tricky but I think I got it: from what I understand, the commands used in CI were not actually doing what you'd think. The sbt ++<version> cmd1 cmd2 was running only cmd1 with the desired Scala version, cmd2 was running on all Scala versions. Sounds a bit weird, not sure I understood everything to be honest.

This is the reason I had to make changes to CI:

  • actually run all commands with the desired Scala version
  • use Scala 2.13 for scalafmtCheck and coverage reports (otherwise we lose coverage for enumeratum-play which is not available in 2.12)
  • fix style so that scalafmt (on compile) runs without error with Scala 3 (it was failing on a macro, not sure why, just disabled it)

I've done several commits but happy to move these unrelated changes to another PR first if you prefer to.

@gaeljw gaeljw marked this pull request as ready for review November 5, 2023 17:05
Copy link
Owner

@lloydmeta lloydmeta left a comment

Choose a reason for hiding this comment

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

LGTM. Just holding on merging until I get time to also release.

@lloydmeta lloydmeta merged commit 47dd3e1 into lloydmeta:master Nov 12, 2023
3 checks passed
@lloydmeta
Copy link
Owner

Thanks for this. Just pushed 1.8.0 of the Play integration libs to Maven central based on this.

@gaeljw
Copy link
Contributor Author

gaeljw commented Nov 12, 2023

Great news :)

@gaeljw gaeljw deleted the play3 branch November 12, 2023 08:06
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.

Support play-json 3.0.x
3 participants