replikativ / datahike

A fast, immutable, distributed & compositional Datalog engine for everyone.
https://datahike.io
Eclipse Public License 1.0
1.62k stars 95 forks source link

Reflection warnings need to be fixed for native Datahike #632

Open TimoKramer opened 1 year ago

TimoKramer commented 1 year ago

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

whilo commented 2 months ago

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

TimoKramer commented 2 months ago

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)

whilo commented 2 months ago

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