-
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
desugar doesn't work with Bazel 0.17.1 and --host_javabase=<jdk8> #6159
Comments
@cushon I'm using the one from the binary installer. Also, using JDK9 is not an option when building Android binaries as it does not support it yet (JDK8 only). Although I think Bazel is supposed to handle it automatically? See #5978 (comment) |
The warnings are annoying but harmless. We should suppress them. (Related: #6151.)
Can you provide more context about what doesn't work? The |
As in https://github.com/bazelbuild/bazel/releases/download/0.17.1/bazel-0.17.1-installer-darwin-x86_64.sh? Then I can't reproduce the problem you reported without Can you share the output of |
@cushon never mind you were right, I thought the warning were a sign of the previous bug (which would cause our downstream gradle-based build to fail). But I tested it right now and it does work without Yes I'm using https://github.com/bazelbuild/bazel/releases/download/0.17.1/bazel-0.17.1-installer-darwin-x86_64.sh since bazelbuild/homebrew-tap#4 is not merged yet. I wanted to check if there was any issue before people at the office start upgrading. Just in case:
|
Thanks for confirming! I'm still interested in the use-case for |
@cushon thanks for driving this! So let me summarize the issues so far:
Did I miss anything else? |
I think that's right. Note that (3) also affects anyone using Bazel without an embedded JDK together with a locally installed JDK 8, since it will default to using the local JDK 8 as the
I think the mitigation is:
And if there ends up being a 0.17.2 it should include 2e677fb. |
This sounds like it warrants a point release, since it's a regression introduced in 0.17. |
(cc @ahumesky) |
I agree, given the emphasis on preserving support for |
I think we can close this because #6164 fixed it |
original context: #5978 (comment).
cc @lberki @jin
Setup:
//src:bazel_nojdk
@ 7bb9e0f (0.17.1)[email protected]:cushon/bazel_issue_5978.git
It works for me without
--config jdk8
if I use a Bazel binary that includes the bundled JDK, or explicitly configure a JDK 9--host_javabase
:The problem is that the
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
JVM flag added to desugar in d02f876 is incompatible with a JDK 8 `--host_javabase.That issue was later fixed by 2e677fb, but the fix wasn't included in 0.17.1.
@steeve which installer are you using for Bazel? Is it one of the homebrew ones? If you have the option of using the binary from the releases page: https://github.com/bazelbuild/bazel/releases/tag/0.17.1, it should work around the problem. The other work-around is to install JDK 9 and use it as the
--host_javabase
, like in the example above.The text was updated successfully, but these errors were encountered: