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 Java 21 LTS #8

Open
rtyley opened this issue Jun 12, 2024 · 0 comments
Open

Upgrading to Java 21 LTS #8

rtyley opened this issue Jun 12, 2024 · 0 comments
Labels
Java Upgrading Java

Comments

@rtyley
Copy link
Member

rtyley commented Jun 12, 2024

Base assumption: Project is already on Java 11

Overview

Minimum requirements

  • Scala: 2.12.18+, 2.13.11+, 3.3.1+
  • sbt: 1.9.0+

Using a version of sbt that's too old while running under Java 21 will give an error like this:

error:
    bad constant pool index: 0 at pos: 48461
       while compiling: <no file>
          during phase: globalPhase=<no phase>, enteringPhase=<some phase>
       library version: version 2.12.16
      compiler version: version 2.12.16
    reconstructed args: -classpath /home/runner/.sbt/boot/scala-2.12.16/lib/scala-library.jar -Yrangepos

Tips

  • Include "-release:21" in your build.sbt scalacOptions, to ensure that the project is built to support Java 21 or above.
rtyley added a commit to guardian/tagmanager that referenced this issue Sep 18, 2024
This satisfies one of the updated requirements of Panda v7 - as of
guardian/pan-domain-authentication#150 it
requires Java 11.

See also:

* guardian/maintaining-scala-projects#3
* guardian/maintaining-scala-projects#8
rtyley added a commit to guardian/tagmanager that referenced this issue Sep 18, 2024
This satisfies one of the updated requirements of Panda v7 - as of
guardian/pan-domain-authentication#150 it
requires Java 11.

See also:

* guardian/maintaining-scala-projects#3
* guardian/maintaining-scala-projects#8
@rtyley rtyley added the Java Upgrading Java label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Upgrading Java
Projects
None yet
Development

No branches or pull requests

1 participant