From some testing with cljs-test-runner, which uses doo, it seems that doo calls the ClojureScript function enable-console-print! during initialization of a Node.js-based ClojureScript runtime.
This has the slight disadvantage that ClojureScript functions like print, pr, and a few others, that should not print a newline at the end of their output, do so.
I believe that if instead when Node.js is the runtime, that doo caused it to initialize its print functions using code like shown below, it should fix this minor misbehavior:
(defn enable-nodejs-print! []
(set! *print-newline* true)
(set-print-fn!
(fn [& strings]
(doseq [s strings]
(.write js/process.stdout s))))
(set-print-err-fn!
(fn [& strings]
(doseq [s strings]
(.write js/process.stderr s)))))
I have tested a similar change within ClojureScript itself, with good results for Node.js-based ClojureScript REPLs. https://clojure.atlassian.net/browse/CLJS-3153
From some testing with cljs-test-runner, which uses doo, it seems that doo calls the ClojureScript function enable-console-print! during initialization of a Node.js-based ClojureScript runtime.
This has the slight disadvantage that ClojureScript functions like print, pr, and a few others, that should not print a newline at the end of their output, do so.
I believe that if instead when Node.js is the runtime, that doo caused it to initialize its print functions using code like shown below, it should fix this minor misbehavior:
I have tested a similar change within ClojureScript itself, with good results for Node.js-based ClojureScript REPLs. https://clojure.atlassian.net/browse/CLJS-3153