Fork me on GitHub
#graalvm
<
2021-06-05
>
dominicm20:06:47

I happen to know there's reflection in bidi, so example of doing this:

~ 1m 18s
❯ clj -Sdeps '{:deps {bidi/bidi {:mvn/version "2.1.6"}}}' -M -e '(set! *warn-on-reflection* true)' -r
true
user=> (require 'bidi.bidi)
Reflection warning, bidi/bidi.cljc:20:31 - call to static method decode on java.net.URLDecoder can't be resolved (argument types: java.lang.String, unknown).
nil
user=> 

borkdude21:06:49

yes, works fine

borkdude20:06:04

ok, I think:

$ clj -M -e "(set! *warn-on-reflection* true)" -e '(fn [x] (.length x))'
true
Reflection warning, NO_SOURCE_PATH:1:9 - reference to field length can't be resolved.
#object[user$eval138$fn__139 0x73eb8672 "user$eval138$fn__139@73eb8672"]
will do fine then. As long as you do the set! before any other namespaces are loaded

borkdude20:06:29

confirmed:

$ clj -M -e "(set! *warn-on-reflection* true)" -e "(require 'asami.core)"
true
Reflection warning, asami/graph.cljc:43:58 - reference to field id on java.lang.Object can't be resolved.
Reflection warning, asami/graph.cljc:68:21 - reference to field id can't be resolved.
Reflection warning, zuko/logging.clj:14:36 - reference to field getClassName can't be resolved.
Reflection warning, zuko/logging.clj:13:30 - reference to field getStackTrace can't be resolved.
Reflection warning, zuko/logging.clj:78:5 - call to method append on java.io.Writer can't be resolved (argument types: unknown).
planner.cljc:107 recur arg for primitive local: mcount is not matching primitive, had: Object, needed: long
Auto-boxing loop arg: mcount
Reflection warning, asami/durable/block/file/voodoo.clj:18:14 - reference to field clean on java.lang.Object can't be resolved.

borkdude21:06:20

$ ./asami
(["Explorers"] ["Demolition Man"] ["Johnny Mnemonic"] ["Toy Story"])

catjam 6