Fork me on GitHub
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


@marco.pasopas map is lazy. Try run!

👍 3
Marco Pas10:01:21

Works, learned something new 🙂


@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.


oh cool!


I'll have to try that out


thank you for the heads up