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

Conditionally set -Djava.security.manager=allow for jdk >= 17 #1555

Merged
merged 5 commits into from
Mar 20, 2024

Conversation

simuons
Copy link
Collaborator

@simuons simuons commented Mar 19, 2024

Conditionally set -Djava.security.manager=allow for jdk >= 17

Description

rules_scala uses SecurityManager which is deprecated and fails at runtime on jdk21+ (no replacement for this yet)

Bazel's approach to solve this is conditionally add a jvm flag see bazelbuild/bazel#14502

CI builds were failing for some time because jdk was updated to 21

Motivation

Resolves #1521
Duplicate of #1539

This is an emergency pr to make build pass on ci

Probably tool_java_runtime_version started to resolve to jdk 21

And builds are failing with
`java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release`

Need to solve bazelbuild#1539 asap
@simuons simuons requested a review from liucijus as a code owner March 19, 2024 18:05
@simuons simuons changed the title Set default jdk version to 17 for the build Conditionally set -Djava.security.manager=allow for jdk >= 17 Mar 19, 2024
@simuons simuons merged commit f123577 into bazelbuild:master Mar 20, 2024
2 checks passed
KevinBoyette pushed a commit to KevinBoyette/rules_scala that referenced this pull request Mar 20, 2024
…uild#1555)

Conditionally set -Djava.security.manager=allow for jdk >= 17

rules_scala uses SecurityManager which is deprecated and fails at runtime on jdk21+ (no replacement for this yet)

Bazel's approach to solve this is conditionally add a jvm flag see bazelbuild/bazel#14502

CI builds were failing for some time because jdk was updated to 21
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.

rules_scala support for JDK 21
1 participant