Fork me on GitHub
#graalvm
<
2020-01-31
>
ghadi14:01:01

does native-image handle Java 11 yet?

borkdude14:01:43

there is however an issue with clojure + jdk11 when you use Reflector.java. It has a piece of dynamic code that dispatches between 8 and 11 based on some runtime value which confuses the svm analyzer. I worked around that just by copying Reflector.java and removing that dynamic code: https://github.com/borkdude/sci/blob/1294b17d402bfed519289990648cb01c45e8e3a8/reflector/src-java/clojure/lang/Reflector.java#L29-L43

borkdude14:01:03

I'm still not using JDK11 for anything GraalVM at the moment, just fyi

borkdude14:01:25

any specific reason you would want to use jdk11, or just curious?

Alex Miller (Clojure team)14:01:17

I'm guessing the new http client :)

ghadi14:01:18

curious about making stuff with the built in http://java.net.http client

ghadi14:01:35

yeah -- gets rid of a bunch of dependencies

borkdude14:01:26

if you need an http client in a graal binary, you can also use clj-http-lite which has no other dependencies: https://github.com/borkdude/clj-http-lite/blob/fa277d8264b061db8ae9b4fc117b74b1fc2d93ce/project.clj#L7

borkdude14:01:40

(but it doesn't do async like the JDK11 one I think)

borkdude15:01:19

it uses HttpURLConnection