Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rules_scala JDK lookup when using --nolegacy_external_runfiles. (#…
…1397) * Fix rules_scala JDK lookup when using --nolegacy_external_runfiles. java_executable_exec_path does not look up the right path when resolving the JDK from the runfiles directory and legacy_external_runfiles is disabled. java_executable_runfiles_path should be used instead. Examples of these paths when running "bazel build test:ScalaBinaryInGenrule": java_executable_exec_path: external/remotejdk11_macos/bin/java java_executable_runfiles_path: ../remotejdk11_macos/bin/java The working directory appears to be ScalaBinary.runfiles/io_bazel_rules_scala. When legacy_external_runfiles is enabled, the JDK is present in ScalaBinary.runfiles/remotejdk11_macos but is also linked in ScalaBinary.runfiles/io_bazel_rules_scala/external/remotejdk11_macos, so looking up using either exec_path or runfiles_path is correct. When legacy_external_runfiles is disabled, the JDK only goes in ScalaBinary.runfiles/remotejdk11_macos, so only runfiles_path will work. * Add regression test * missing bazel
- Loading branch information