borkdude / clj-reflector-graal-java11-fix

A fix for an issue with clojure.lang.Reflector in GraalVM native-image JDK11.
Eclipse Public License 1.0
15 stars 1 forks source link

reflection config suggestion doesn't work #5

Closed andreivolt closed 3 years ago

andreivolt commented 3 years ago

Just a heads-up, I tried to build https://github.com/hagmonk/find-deps with the suggested reflection config and it failed, I had to add entries with `"allPublicMethods": true" for each class. Apparently there's no way to specify a wildcard, though I would appreciate hints on how to gather all those class names automatically, perhaps with some static analysis?

borkdude commented 3 years ago

@andreivolt What do you mean "for each class"?

andreivolt commented 3 years ago

In this case it was reflection for some java.io classes, but I was just coming back to this issue to tell you I stumbled upon https://github.com/borkdude/tools-deps-native-experiment/blob/master/script/gen-reflect-config.clj which looks like exactly what I need.

borkdude commented 3 years ago

You can find more information about that here: https://github.com/borkdude/refl

But it's usually better to get rid of the reflection warnings if you can in the Clojure code itself.

andreivolt commented 3 years ago

Thank you I will!