bazelbuild / rules_scala

Scala rules for Bazel
Apache License 2.0
359 stars 266 forks source link

Build with JDK 21 #1556

Closed simuons closed 3 months ago

simuons commented 4 months ago

Codebase doesn't build with jdk 21 with default settings.

Issue is that workers and test runners use SecurityManager which fails at runtime.

Fix is to conditionally add -Djava.security.manager=allow jvm flag to:

This change involves some kind of guessing with which jdk version worker will be run.

JDK is linked into worker/executable runfiles and it matches host jdk (hence added _java_host_runtime attribute to all relevant rules)

Added separate build for jdk 21