Building a java_runtime_image without rex:
Build finished; total time 410ms, incrementality 100.0%. Outputs:
//third_party/java:jre:
plz-out/bin/third_party/java/jre
Building a java_runtime_image with rex:
Build stopped after 3.89s. 1 target failed:
//third_party/java:jre
Remotely executed command exited with 1
[...]
Stdout:
Error: automatic module cannot be used with jlink: jrt.fs from file:///tmp/plz_sandbox/third_party/java/toolchain/lib/jrt-fs.jar
The difference appears to be that for rex, all of the target's inputs are copied into the sandbox directory - including the java_toolchain containing the offending jrt-fs.jar. It's added to the jlink module path by find "$TMP_DIR" -name "*.jar" | tr \\\\n :, which is semantically incorrect - I'm not sure this has ever worked.
Building a
java_runtime_imagewithout rex:Building a
java_runtime_imagewith rex:The difference appears to be that for rex, all of the target's inputs are copied into the sandbox directory - including the
java_toolchaincontaining the offendingjrt-fs.jar. It's added to the jlink module path byfind "$TMP_DIR" -name "*.jar" | tr \\\\n :, which is semantically incorrect - I'm not sure this has ever worked.