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

Allow building under Java 21 LTS #105

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Conversation

rtyley
Copy link
Member

@rtyley rtyley commented Mar 14, 2024

See guardian/scala-steward-public-repos#68 ... we're now running our Scala Steward workflow with Java 21 LTS, 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 8).

(unfortunately the Scala Steward run failing affects everyone, see guardian/scala-steward-public-repos#60 - so I've removed mobile-save-for-later from Scala Steward until this PR is merged)

Being able to build with Java 21 requires using recent versions of Scala (2.12.18+) and sbt (1.9.0+).

See guardian/scala-steward-public-repos#68 ...
we're now running our Scala Steward workflow with Java 21 LTS, which
means that all projects that want to have Scala Steward updates (like
https://github.com/guardian/mobile-save-for-later) need to be able
to build under Java 21 (even if the projects are still _running_ in
production on Java 8).

Being able to build with Java 21 requires using recent versions of
Scala (2.12.18+) and sbt (1.9.0+):

https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html#jdk-21-compatibility-notes
@@ -6,6 +6,9 @@ import scala.collection.immutable

val testAndCompileDependencies: String = "test->test;compile->compile"

ThisBuild / libraryDependencySchemes +=
"org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always // due to Identity using lift-json
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a nasty hack, but necessary as our Identity libraries use lift-json, and lift-json is compiled against an old version of scala-xml.

The hack is used in many Guardian repos!

Copy link
Member

@johnduffell johnduffell left a comment

Choose a reason for hiding this comment

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

thanks Roberto, good to be on recent versions of sbt and patch version of scala 👍

@rtyley rtyley mentioned this pull request Mar 19, 2024
7 tasks
@rtyley rtyley merged commit 65815c5 into main Mar 19, 2024
2 checks passed
@rtyley rtyley deleted the allow-building-under-java-21-lts branch March 19, 2024 15:33
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.

2 participants