hi! this is not exactly a babashka question but i'm not sure where else to ask. i am getting this error when clojure tries to print another unrelated error:
Exception in thread "main" java.lang.IllegalArgumentException: Multiple methods in multimethod 'simple-dispatch' match dispatch value: class babashka.process.Process -> interface clojure.lang.IPersistentMap and interface clojure.lang.IDeref, and neither is preferred
i think this is because there is a bug in babashka.Process's toString impl? i am not quite sure how to debug ithere's a backtrace: https://gist.github.com/jyn514/25f823335ddfae33b494fa2501bd4b20
require the namespace babashka.process.pprint and the problem will go away
in your host
oh wild
that tells the clojure runtime to give precedence to babashka.pprint, i guess?
yes that fixed it
thank you!
you can check the source to see what it does :)
why is it a separate namespace? why not include it in babashka.process?
I wanted to make babashka.process not force users to load clojure.pprint in their runtime
oh i see, because this could be an SCI guest and now Graal has to include it in the native image?
clojure.pprint can cause quite large graalvm binaries because there's dynamic find-var usage here: https://github.com/clojure/clojure/blob/da1c748123c80fa3e82e24fc8e24a950a3ebccd9/src/clj/clojure/pprint/pprint_base.clj#L148
gotcha
this is also why I have some patches for clojure.pprint in babashka