guardian / guardian/grid

Scala Steward can not run on this repo until it allows building under Java 21

Open
#4,261 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
1.5k
Forks
121
Avg merge
4d 1h
Merged PRs (30d)
29

Description

See https://github.com/guardian/scala-steward-public-repos/pull/67 ... 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).

As `guardian/grid` is on some mildly old versions of sbt/Scala that can't handle Java 21, it currently is causing the Scala Steward job to [fail](https://github.com/guardian/scala-steward-public-repos/actions/runs/8613797096/job/23605869144#step:6:345):

> 2024-04-09 09:56:46,335 ERROR Steward guardian/grid failed
> org.scalasteward.core.io.process$ProcessFailedException: '"SBT_OPTS=-Xmx2048m -Xss8m -XX:MaxMetaspaceSize=512m" sbt -Dsbt.color=false -Dsbt.log.noformat=true -Dsbt.supershell=false -Dsbt.server.forcestart=true ;+ stewardDependencies;reload plugins;stewardDependencies' exited with code 1.
> copying runtime jar...
> [info] [launcher] getting org.scala-sbt sbt 1.6.2 (this may take some time)...
> [info] [launcher] getting Scala 2.12.15 (for sbt)...
> [info] welcome to sbt 1.6.2 (Amazon.com Inc. Java 21.0.2)
> error:
> bad constant pool index: 0 at pos: 48461
> while compiling:
> during phase: globalPhase=, enteringPhase=
> library version: version 2.12.15
> compiler version: version 2.12.15
> reconstructed args: -classpath /home/runner/.sbt/boot/scala-2.12.15/lib/scala-library.jar -Yrangepos

_(unfortunately the Scala Steward run failing affects everyone, see https://github.com/guardian/scala-steward-public-repos/issues/60 - so I've removed `guardian/grid` from Scala Steward until this PR is merged)_

Being able to build with Java 21 [requires](https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html#jdk-21-compatibility-notes) using recent versions of Scala (2.12.18+) and sbt (1.9.0+) - https://github.com/guardian/mobile-save-for-later/pull/105 should provide a good example of how to fix a repo up!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.