You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments