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

Upgrading to Play 2.9 #1

Open
rtyley opened this issue Feb 21, 2024 · 0 comments
Open

Upgrading to Play 2.9 #1

rtyley opened this issue Feb 21, 2024 · 0 comments

Comments

@rtyley
Copy link
Member

rtyley commented Feb 21, 2024

Base assumption: Project is already on Play 2.8

Note that Play 2.8 will be end-of-life (EOL) on 31st May 2024.

  • You may be able to jump straight to Upgrading to Play 3.0 #4, which would include all these steps, as well as the Akka→Pekko transition.
  • Play 2.9 restricts itself to Akka 2.6, to avoid the Akka BSL license which began with Akka 2.7

Due to the requirements of Play 2.9, you'll need to perform these upgrades (ideally in separate steps if the project is big) and in this order:

  1. Upgrading to Scala 2.13 #2
  2. Upgrading to Java 11 #3
  3. Finally, upgrading to Play 2.9

Examples

rtyley added a commit to guardian/typerighter that referenced this issue Mar 20, 2024
This upgrade to Play 2.9 was prompted by guardian/scala-steward-public-repos#67
which means that all projects that want to have Scala Steward updates (like this one)
need to be able to _build_ under Java 21 (even if the projects are still _running_ in
production on Java 11).

Building under Java 21 requires a recent version of sbt, and that leads to a version
bump for `scala-xml` that gives version-compatibility errors:

```
[error] 	* org.scala-lang.modules:scala-xml_2.12:2.1.0 (early-semver) is selected over {1.2.0, 1.1.1}
[error] 	    +- org.scala-lang:scala-compiler:2.12.18              (depends on 2.1.0)
[error] 	    +- com.typesafe.sbt:sbt-native-packager:1.5.2 (scalaVersion=2.12, sbtVersion=1.0) (depends on 1.1.1)
[error] 	    +- com.typesafe.play:twirl-api_2.12:1.5.1             (depends on 1.2.0)
```

...the nicest way to fix these errors is to upgrade to Play 2.9 or above, so here we are!

https://github.com/guardian/pan-domain-authentication didn't get Play 2.9 artifacts until
relatively recently, so upgrading the Panda version was also necessary.

See also:
* guardian/maintaining-scala-projects#1
rtyley added a commit to guardian/typerighter that referenced this issue Mar 20, 2024
This upgrade to Play 2.9 was prompted by guardian/scala-steward-public-repos#67
which means that all projects that want to have Scala Steward updates (like this one)
need to be able to _build_ under Java 21 (even if the projects are still _running_ in
production on Java 11).

Building under Java 21 requires a recent version of sbt, and that leads to a version
bump for `scala-xml` that gives version-compatibility errors:

```
[error] 	* org.scala-lang.modules:scala-xml_2.12:2.1.0 (early-semver) is selected over {1.2.0, 1.1.1}
[error] 	    +- org.scala-lang:scala-compiler:2.12.18              (depends on 2.1.0)
[error] 	    +- com.typesafe.sbt:sbt-native-packager:1.5.2 (scalaVersion=2.12, sbtVersion=1.0) (depends on 1.1.1)
[error] 	    +- com.typesafe.play:twirl-api_2.12:1.5.1             (depends on 1.2.0)
```

...the nicest way to fix these errors is to upgrade to Play 2.9 or above, so here we are!

https://github.com/guardian/pan-domain-authentication didn't get Play 2.9 artifacts until
relatively recently, so upgrading the Panda version was also necessary.

See also:
* guardian/maintaining-scala-projects#1
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

No branches or pull requests

1 participant