datahike icon indicating copy to clipboard operation
datahike copied to clipboard

Reflection warnings need to be fixed for native Datahike

Open TimoKramer opened this issue 2 years ago • 3 comments

Describe the feature you would like to request

There should be no reflection to use Datahike via GraalVM native-compiled binary

Describe the solution you would like

No reflection warnings

Describe alternatives you've considered

none

TimoKramer avatar Jul 24 '23 09:07 TimoKramer

Some of them have been fixed now, not sure whether all of them are.

whilo avatar Jun 17 '24 20:06 whilo

I am using this alias for my repl:

   :repl/portal {:extra-deps {nrepl/nrepl {:mvn/version "1.1.0"}
                              cider/cider-nrepl {:mvn/version "0.43.3"}
                              djblue/portal {:mvn/version "0.49.1"}}
                 :jvm-opts ["--enable-preview"]
                 :main-opts ["-e" "(set! *warn-on-reflection* true)"
                             "-m" "nrepl.cmdline"
                             "--middleware" "[cider.nrepl/cider-middleware,portal.nrepl/wrap-portal]"]}}}

We could (set! *warn-on-reflection* true) or #?(:clj (set! *warn-on-reflection* true)) in each namespace to be sure we catch all of it. Or this: https://ask.clojure.org/index.php/3787/theres-enable-warn-reflection-from-command-running-clojure (borkdude's comment)

TimoKramer avatar Jun 19 '24 06:06 TimoKramer

A build profile adjustment sounds good, adding a lot of code for it would be not so ideal.

whilo avatar Jun 23 '24 17:06 whilo