-
Notifications
You must be signed in to change notification settings - Fork 12
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 to Play 2.9, fix Scala Steward #464
Conversation
initialize := { | ||
val _ = initialize.value | ||
val expectedJavaVersion = parseJavaVersionNumber(javaVersionNumber) | ||
val actualJavaVersion = removeStartingOne(sys.props("java.specification.version")) | ||
assert( | ||
expectedJavaVersion.equals(actualJavaVersion), | ||
s"Java $expectedJavaVersion is required for this project. You are using Java $actualJavaVersion." | ||
) | ||
}, |
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 now require that projects be able to build with Java 21 if they're using Scala Steward, even if they aren't using Java 21, so this strict rule here of requiring exactly Java 11 for the build is not helpful. We could have changed it to a greater-than-or-equals condition, but that's already accomplished by the -release:11
config already present:
Line 11 in b12225d
"-release:11", |
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
b12225d
to
e290496
Compare
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. Any reason not to go straight to Play 3.0?
I'm just minimising what I need to check before fixing Scala Steward! |
Seen on Rule Manager (merged by @rtyley 1 hour, 44 minutes and 57 seconds ago) Please check your changes! |
This upgrade to Play 2.9 was prompted by guardian/scala-steward-public-repos#67 which requires 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:...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:
(unfortunately the Scala Steward run failing affects everyone, see guardian/scala-steward-public-repos#60 - so I've removed
typerighter
from Scala Steward until this PR is merged)