bensu / doo

doo is a library and lein plugin to run cljs.test on different js environments.
Eclipse Public License 1.0
324 stars 63 forks source link

Compile-time stdout corrupts JS output #109

Open moea opened 8 years ago

moea commented 8 years ago

More of a question than an issue, because I can't see where this happening after cursory inspection. I've got a dependency (Timbre) which conditionally writes to stdout at compile time. While that may not be a fantastic idea itself, when doo compiles my build the console output is redirected to the source file.

// Compiled by ClojureScript 1.8.51 {:target :nodejs}        
Compile-time (elision) Timbre level: :warn 
goog.provide('taoensso.timbre');  

The middle line being the problem. Thoughts?

Compiling via lein doo node test-none once, project file is here

bensu commented 8 years ago

Hi @moea,

Does this happen when using cljsbuild or the compiler directly?

moea commented 8 years ago

Hey! I didn't try using the compiler directly, but no, it doesn't happen with cljsbuild. w/ cljsbuild I see the compiler's console output and the print statement, which w/ doo is I guess is swallowed by whatever leiningen.core.eval is doing with subprocess output - which I can't really follow.

bensu commented 8 years ago

Thanks for the quick reply!

This is a doo issue then. It is important to redirect the standard output of some process to get the error reporting, but the compiler should fall into that. I'll look into it and see what is the best way to solve it.