-
Notifications
You must be signed in to change notification settings - Fork 4.4k
DumpPlatformClassPath regression with --host_javabase=<jdk8> #6203
Copy link
Copy link
Closed
Labels
P1I'll work on this now. (Assignee required)I'll work on this now. (Assignee required)team-Rules-JavaIssues for Java rulesIssues for Java rules
Description
With Bazel @ c608f65:
$ bazel build -s --host_javabase=@bazel_tools//tools/jdk:absolute_javabase --define=ABSOLUTE_JAVABASE=$JAVA9_HOME @bazel_tools//tools/jdk:platformclasspath
... OK
bazel build -s --host_javabase=@bazel_tools//tools/jdk:absolute_javabase --define=ABSOLUTE_JAVABASE=$JAVA8_HOME @bazel_tools//tools/jdk:platformclasspath
...
ERROR: external/bazel_tools/tools/jdk/BUILD:212:1: SkylarkAction external/bazel_tools/tools/jdk/platformclasspath_classes failed (Exit 2) javac failed: error executing command ./jdk1.8.0-latest/bin/javac -source 8 -target 8 -Xlint:-options -cp ./jdk1.8.0-latest/lib/tools.jar -d ... (remaining 2 argument(s) skipped)
javac: directory not found: bazel-out/k8-fastbuild/bin/external/bazel_tools/tools/jdk/platformclasspath_classes
Usage: javac <options> <source files>
The failing action is invoking javac with the output directory set to a TreeArtifact.
bazel/tools/jdk/default_java_toolchain.bzl
Line 124 in 999354b
| args.add(class_dir) |
The JDK 9 javac will create its output directory if it doesn't already exist, but the JDK 8 javac will not.
Apparently ctx.actions.declare_directory doesn't actually create the directory for the action, the action is expected to create it itself. Is that a bug?
Reactions are currently unavailable
Metadata
Metadata
Labels
P1I'll work on this now. (Assignee required)I'll work on this now. (Assignee required)team-Rules-JavaIssues for Java rulesIssues for Java rules