It worked in spire.
https://github.com/epiccastle/spire/commit/07da06a24bfefbfbce9fa58670a25e4dc3044be4
(and worked being built against graal 20.1.0-dev)
(ok the 20.0.0 version worked on 20.1.0-dev 20200225_0946 build... but not on newer one on mac...)
will try rolling my own 20.1.0 version
@retrogradeorbit Thanks for testing. If there are svm.jar versions for 20.1.0-dev available on maven, I'd be happy to make a pre-release for that
doesnt look like there are
ok
@borkdude it works for me (FE app) as well
nice!
Hi folks! I'm playing around with graalVM for compiling a native image but could use some help with getting past some reflection issues.
The project is a command line utility that takes a url to a podcast rss feed and downloads the episodes. i used a library called feedparser-clj
which works great but has also caused reflection issues. I managed to get past a few problems by creating a reflection.json file and dumping the missing class / method / library into it > recompiling > trying the lib > finding another missing reference (I'm not sure if I'm using the right terms. I'm using native-image
with lein. Here's a snippet of what I'm working with, if anyone has any tips!
@tees Maybe a better idea is to just fork the lib, fix the reflection issues, use that in your native-image and PR the fixes back to the repo. This way it makes it better for everyone in the ecosystem long term.
@borkdude Perhaps, yes. I'm still a bit new to Clojure so I might be a ways off from doing that (successfully). Still, you make a good point.
@tees The way to start with this is to put (set! *warn-on-reflection* true)
in the namespace and then fix the issues one by one by adding type hints
I have to run to the gym (I wasn't expecting such a quick response, thanks @borkdude -- and thanks for all the resources you've put up online, I was creeping them all last night 😅 ). I'll think about your point and go from there.
I might poke around here and ask a few more questions later today.
https://circleci.com/gh/epiccastle/spire/692 <- 20.1.0-dev-20200229_0326 does work with clj-reflector-graal-java11-fix 20.0.0 patch
so that will do for me for now.
cool. as soon as 20.1.0 is out I'll make a release for it. all these svm.jars are incompatible over versions
I'm glad we have a decent fix for this JDK11 issue!