integrant

willier 2021-04-26T21:37:45.039800Z

anyone know if it is possible to use integrant with graalvm?

kwrooijen 2021-04-29T07:00:54.040200Z

Yes it is. You can even run Duct in graalvm

kwrooijen 2021-04-29T07:01:08.040400Z

(which is built with integrant)

willier 2021-05-01T01:48:58.041300Z

👍

2021-05-04T15:09:34.041900Z

if you use ig/load-namespaces it may cause you problems though. Though even there I’d imagine it should be possible if you set *compile-files* and run ig/load-namespaces in a binding.

kwrooijen 2021-05-04T19:40:31.042100Z

True, I ran into this issue actually. I wrote a namespace to handle this with a macro. https://gist.github.com/kwrooijen/e932169d5fed2b84f464ef51777621cb

kwrooijen 2021-05-04T19:42:11.042400Z

This will add require statements for any keys at compile time. So you don't have to require everything manually in the main namespace

kwrooijen 2021-05-04T19:42:36.042600Z

(This was specifically made for Duct though, not pure Integrant)

2021-05-05T07:10:44.042800Z

Interesting idea to use a macro… I’ve aot’d integrant systems before with the above approach using compile and ig/load-namespaces (or an alternative if you want to compile all keys) in a binding, I’ve not tried it with graalvm though. You can use the same approach to speed up working at a repl by essentially combining it with the instructions here, which was the main reason I did it: https://clojure.org/guides/dev_startup_time