-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Buck does not compile with Java 11 #1548
Comments
Well, sort of. Some codepaths in the Java compilation support don't like it much. :-) |
known problem :( Internally we haven't embraced Java 9 yet, but it's on our radar to fix Java 9 builds :) |
I've submitted a patch that mostly gets Buck built under JDK9. There are some remaining issues because of the Skylark dependency, which uses an old version of AutoValue that is not JDK9 friendly. |
Thank you, @epkugelmass! This is pretty awesome. I'm going to work on resolving the old AutoValue issue. |
Looks like even the latest version of AutoValue still has issues, so I'm going to have to wait until google/auto#563 is merged, new version of AutoValue is released and it's used in Bazel :( |
Awesome! You'll probably also want to bump ASM for the RELEASE_9 Opcodes. Or I can do it. Was feeling a bit lazy. |
Nevermind -- buck is already using 6.0. I'll update the patch to take advantage of that. |
@ttsugriy I released a private version of |
Actually google/auto#563 is merged so @ttsugriy it is good time to revisit this issue ;) |
Java 9 is no longer supported by Oracle, so we are unlikely to be supporting it. We may repurposes this for Java 10 support though. |
@davido, looks like Bazel is still using autovalue 1.4 https://source.bazel.build/bazel/+/master:third_party/auto/auto-value-1.4.jar :( |
@ttsugriy Right, but I was able to build Bazel with this version with Java 9, see bazelbuild/bazel#4820. |
@ttsugriy I filed this issue: bazelbuild/bazel#4906. I'm on vacation now, and can only look into it later. |
I'm also fixing a few issues that creeped into Buck's codebase that relied on a different behavior of HashMap#computeIfAbsent which used to allow value computations inside of computeIfAbsent block (despite explicitly saying in javadoc that nobody should do it :) I've already fixed one of such bugs and will try to fix the rest as soon as possible. I'm testing against Java 10 though, since Java 9 is dead :) |
sorry, wrong link. I was referring to [HashMap#computeIfAbsent's](https://docs.oracle.com/javase/10/docs/api/java/util/HashMap.html#computeIfAbsent(K,java.util.function.Function) which says
|
By replacing ecj with the system compiler, it's possible to get further in the ant build. However, the aosp compilation fails because |
I guess another modification of the title is needed ;)
|
Actually, I can compile Buck with JDK11 without any issue. When I try to run Buck built on JDK11 it crashes: http://paste.openstack.org/show/744455. Is it a known issue? |
Known problem, though I don't know if there is a GitHub issue open for it. https://github.com/facebook/buck/blame/master/programs/buck.py#L187 |
Set your JAVA_HOME to point to an official Java 9 JDK. Run
ant clean default
. Watch the catastrophic failure of the build.Fortunately, once you have a compiled version of buck, it runs under Java 9, which is nice.
The text was updated successfully, but these errors were encountered: