Fork me on GitHub
#babashka
<
2021-01-19
>
Marco Pas08:01:10

Probably a clojure beginner question, but i was wondering why the following code snippet does not seem to work..

(require '[babashka.classpath :as cp])
(map cp/add-classpath ["test1" "test2"])
(print (cp/get-classpath))

$ bb runme.clj
--> result nil
As opposed to this one:
(require '[babashka.classpath :as cp])
(cp/add-classpath "test1")
(cp/add-classpath "test2")
(print (cp/get-classpath))

$ bb runme.clj
--> result test1:test2
When using the repl it works in both cases.. but not when using bb from the command line

borkdude08:01:52

@marco.pasopas map is lazy. Try run!

👍 1
Marco Pas10:01:21

Works, learned something new 🙂

borkdude22:01:45

@nate I think you mentioned some problem with nippy in native image having something to do with Object serialization maybe? This is now possible in GraalVM 21.0.0 when you add classes that you want to serialize to the reflection config.

nate22:01:35

oh cool!

nate22:01:42

I'll have to try that out

nate22:01:55

thank you for the heads up