-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve diagnostics for incorrect java_runtime
configuration
#6118
Comments
@lberki can you also assign a priority? |
We should probably fix this before flipping the default on #6105, but it's not currently on fire. |
The reason I didn't just do this as part of #6105 is that it wasn't obvious to me how to actually report a better error. For Does that sounds reasonable, or is there a nicer way to do this? |
I think that sounds reasonable, but I don't see an obvious way of emitting that error message so we'll probably have to compromise and I'd rather have #6105 fixed now than be delayed for the fix of this issue, especially with the imminent cut of 0.18. I can't think of any way of doing this other than an action that checks were |
Could the action be created by (There's a related feature request somewhere for first-class 'validation action' support, so we could wire actions like that into the graph without having to produce empty files.) |
Yep, it rhymes pretty well with the concept of "validation actions". |
I just hit this following the build instructions on https://github.com/bazelbuild/intellij#building-the-plugin on a fresh new computer, and I'm not even sure how to fix this. Presumably I need to install a system-wide JDK? [edit: after installing a system JDK I was good] |
I'm seeing the issue described in #6475 on Windows, even with a JDK installed, unless I also set JAVA_HOME. It would be very good if the error message could be improved because this just ate a couple of hours of eng time. To make it more interesting, some command-line variants of setting JAVA_HOME result in a warning that JAVA_HOME does not point to a JDK. For example, the standard terminal auto-completes like so: |
I propose we remove Alternative is to use |
Environment variables work pretty well for Bazel (not for Blaze, but the solutions in the two places don't need to be the same) |
cc @lberki
Creating a
java_runtime.java_home
that isn't actually a JDK should result in a better error than it does currently:The text was updated successfully, but these errors were encountered: