bazelbuild / intellij

IntelliJ plugin for Bazel projects
https://ij.bazel.build/
Apache License 2.0
757 stars 298 forks source link

FastBuild Run cannot find Java Binary Path #6432

Closed dtaveras closed 2 weeks ago

dtaveras commented 2 months ago

Description of the bug:

Fast Build Run attempts to use "../local_jdk/bin/java" see https://github.com/bazelbuild/intellij/blob/5f068c931cb8ab1a114753ffd961701e33b2b7c4/java/src/com/google/idea/blaze/java/run/fastbuild/BazelFastBuildTestEnvironmentCreator.java#L28.

Exception in Intellij Screenshot 2024-05-15 at 1 42 57 PM

The project I'm working on does not use the default toolchain instead we have a custom to toolchain, the java binary is not found by https://github.com/bazelbuild/intellij/blob/5f068c931cb8ab1a114753ffd961701e33b2b7c4/java/src/com/google/idea/blaze/java/run/fastbuild/BazelFastBuildTestEnvironmentCreator.java#L74

In our case the java binary is under runfiles with the path jdk17_macos_arm64/Contents/Home/bin/java

Proposed fix here https://github.com/bazelbuild/intellij/pull/6431

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Have a custom toolchain that leads to a directory under *//Test.runfiles/jdk17_macos_arm64

Which Intellij IDE are you using? Please provide the specific version.

IntelliJ IDEA 2024.1.2 Preview

What programming languages and tools are you using? Please provide specific versions.

JDK 17

What Bazel plugin version are you using?

2024.04.23.0.1-api-version-241

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

mai93 commented 2 weeks ago

Fixed with https://github.com/bazelbuild/intellij/pull/6431