Skip to content

Commit cb0eb45

Browse files
committed
Remove old flags from scrooge_compile_with_jdk_11
Removed several deprecated flags that've been no-ops for years, plus `--javacopt='--release 11'`, which caused this breakage after the bump to `rules_java` 7.12.2; ```txt $ RULES_SCALA_TEST_ONLY="scrooge_compile_with_jdk_11" bash ./test/shell/test_twitter_scrooge.sh running test scrooge_compile_with_jdk_11 WARNING: Option 'javabase' is deprecated WARNING: Option 'host_javabase' is deprecated WARNING: Option 'host_java_toolchain' is deprecated WARNING: Option 'java_toolchain' is deprecated WARNING: Option 'javabase' is deprecated WARNING: Option 'host_javabase' is deprecated WARNING: Option 'host_java_toolchain' is deprecated WARNING: Option 'java_toolchain' is deprecated INFO: Analyzed 64 targets (0 packages loaded, 0 targets configured). INFO: Found 64 targets... ERROR: .../src/java/io/bazel/rulesscala/scalac/compileoptions/BUILD:3:13: Compiling Java headers src/java/io/bazel/rulesscala/scalac/compileoptions/libcompileoptions-hjar.jar (1 source file) failed: (Exit 1): turbine_direct_graal failed: error executing command (from target //src/java/io/bazel/rulesscala/scalac/compileoptions:compileoptions) external/remote_java_tools_darwin_arm64/java_tools/turbine_direct_graal --output bazel-out/darwin_arm64-fastbuild/bin/src/java/io/bazel/rulesscala/scalac/compileoptions/libcompileoptions-hjar.jar ... (remaining 32 arguments skipped) Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging java.lang.NullPointerException: attempted to use --release, but JAVA_HOME is not set at [email protected]/java.util.Objects.requireNonNull(Objects.java:259) at com.google.turbine.binder.CtSymClassBinder.bind(CtSymClassBinder.java:55) at com.google.turbine.main.Main.release(Main.java:318) at com.google.turbine.main.Main.bootclasspath(Main.java:304) at com.google.turbine.main.Main.compile(Main.java:142) at com.google.turbine.main.Main.compile(Main.java:133) at com.google.turbine.main.Main.main(Main.java:89) at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH) INFO: Elapsed time: 0.325s, Critical Path: 0.12s INFO: 11 processes: 10 internal, 1 worker. FAILED: Build did NOT complete successfully Test "scrooge_compile_with_jdk_11" failed (0 sec) ``` See also: - Bazel Blog: Bazel 5.0: https://blog.bazel.build/2022/01/19/bazel-5.0.html#java - bazelbuild/bazel: incompatible_use_toolchain_resolution_for_java_rules: use toolchain resolution for Java rules #7849 bazelbuild/bazel#7849
1 parent 20147eb commit cb0eb45

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

test/shell/test_twitter_scrooge.sh

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@ dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
55
runner=$(get_test_runner "${1:-local}")
66

77
scrooge_compile_with_jdk_11() {
8-
# javabase and java_toolchain parameters are deprecated and may be
9-
# removed in Bazel >= 5.0.0
10-
bazel build --javabase=@rules_java//toolchains:remote_jdk11 \
11-
--host_javabase=@rules_java//toolchains:remote_jdk11 \
12-
--host_java_toolchain=@rules_java//toolchains:toolchain_java11 \
13-
--java_toolchain=@rules_java//toolchains:toolchain_java11 \
14-
--javacopt='--release 11' \
8+
bazel build \
159
--java_language_version=11 \
1610
--tool_java_language_version=11 \
1711
--java_runtime_version=remotejdk_11 \

0 commit comments

Comments
 (0)