shadow-cljs

pez 2025-10-30T22:03:19.754809Z

*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. 😃

pez 2025-10-30T23:24:45.359009Z

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

pez 2025-10-31T07:53:54.299359Z

I now tried adding :print-fn :none to my target, but that didn’t make a difference that I could see.

thheller 2025-10-31T08:17:56.371979Z

if you are doing something that needs this to be true, then you should be setting it to true?

thheller 2025-10-31T08:18:29.353939Z

I honestly can't remember why that is there though, but I'm sure it'll break something if I just unset it 😛

thheller 2025-10-31T08:18:58.339739Z

(binding [*print-newline* true] (whatever-you-are-doing))?

pez 2025-10-31T08:24:25.286539Z

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.

thheller 2025-10-31T09:34:03.144709Z

when use with-out-str? no clue what you are doing, so a bit of context would help 😛

pez 2025-10-31T09:53:02.606969Z

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

pez 2025-10-31T09:56:33.439129Z

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