Is there a way to print to standard error from Planck? So far I've gotten (.error js/console "error!")
to work but it's a tad ugly
@spinningarrow This immediately comes to mind: https://github.com/mfikes/planck/issues/452
@spinningarrow Without that, I wonder if (binding [*print-fn* *print-err-fn*] (println "foo"))
does the right thing
@spinningarrow That’s a fairly common approach in ClojureScript. See https://github.com/clojure/clojurescript/blob/9778b34d9e988a28c64133c4751d235bbbd3e966/src/main/cljs/cljs/js.cljs#L28 for example.
@spinningarrow This is also, for example, how analyzer warnings are sent to “stderr”: https://github.com/clojure/clojurescript/blob/9a54081d3e0ffab699ee2e58b2adc595918f7c2b/src/main/clojure/cljs/analyzer.cljc#L488
Thanks for the info and the quick reply! I'll look into those links