tweag / rules_nixpkgs

Rules for importing Nixpkgs packages into Bazel.
Apache License 2.0
294 stars 81 forks source link

set version field of java_runtime #553

Closed malt3 closed 5 months ago

malt3 commented 5 months ago

Using JDK 17+, java_test rules fail if Bazel cannot determine the runtime version from the JavaRuntimeInfo provider, since the java security manager was deprecated in that version.

Please note that adding the version field unconditionally is only compatible with Bazel 6.2.x and 7.0.0 (or later). However, during testing I noticed that the Java toolchain already depends on another recent Bazel feature (@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type) that was added in 6.4 and 7.0, so this is probably fine.

See also: https://github.com/bazelbuild/bazel/commit/7556e1107b666d10b660470a571631463c7eb4ec

Closes #552