*print-newline* is true in dev and false for release builds. What’s the reason for this? I think I need it to be true also in release builds, but also since I don’t know why it is false, I hesitate. 😃
Possibly related. How do I prevent shadow-cljs from doing enable-console-print!? The reason I think shadow does this: https://github.com/thheller/shadow-cljs/blob/425740ca9a0096aeeae5d5134f3531cfce5baa6b/src/main/shadow/cljs/devtools/client/env.cljs#L124-L127
I now tried adding :print-fn :none to my target, but that didn’t make a difference that I could see.
if you are doing something that needs this to be true, then you should be setting it to true?
I honestly can't remember why that is there though, but I'm sure it'll break something if I just unset it 😛
(binding [*print-newline* true] (whatever-you-are-doing))?
Yeah, I’m doing it something like that now. But all println’s still go to the js console, which I’d like to avoid.
when use with-out-str? no clue what you are doing, so a bit of context would help 😛
This is for #joyride. It uses a VS Code integrated terminal for all output. So Joyride code using println prints to this terminal (and js/console.log prints to the Electron console, should that be desired). However, as things are now println prints to both places. I can avoid the problem with newlines not being printed by println by setting the SCI variable for this like so:
https://github.com/BetterThanTomorrow/joyride/blob/master/src/joyride/sci.cljs#L28
But this fixes just one side effect of enable-console-print!. If possible I’d like to avoid enabling console printing like this alltogether.
Thread with more context: https://clojurians.slack.com/archives/C03DPCLCV9N/p1761817939691449
This was what made me try to configure :print-fn :none: https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/build/compiler.clj#L673-L678