Warning from `find-classpath-lib` mistakenly included in generated source
Description
When compiling for node.js, `find-classpath-lib` generates a warning because `cljs/nodejs.js` doesn't contain a `goog.provide` declaration. However, this warning ends up being emitted into the JS files being generated (caused by a call to `with-out-str`), later causing a critical failure in the Closure compiler.
To reproduce:
`lein new cljs-node buggy`
Update clojurescript to r2227, lein-cljsbuild to 1.0.3
`lein cljsbuild once`
Result:
Multiple warnings
Generated "buggy.js" file contains only node.js shebang
Fix:
The simplest patch (attached) is to rebind `out` to `err` when emitting a warning
A better fix would be to write a function for error printing that wraps this idiom
Ideally, cljs/nodejs.js should have a `goog.provides` line added to prevent the warning in the first place
When compiling for node.js, `find-classpath-lib` generates a warning because `cljs/nodejs.js` doesn't contain a `goog.provide` declaration. However, this warning ends up being emitted into the JS files being generated (caused by a call to `with-out-str`), later causing a critical failure in the Closure compiler.
To reproduce:
`lein new cljs-node buggy`
Update clojurescript to r2227, lein-cljsbuild to 1.0.3
`lein cljsbuild once`
Result:
Multiple warnings
Generated "buggy.js" file contains only node.js shebang
Fix:
The simplest patch (attached) is to rebind `out` to `err` when emitting a warning
A better fix would be to write a function for error printing that wraps this idiom
Ideally, cljs/nodejs.js should have a `goog.provides` line added to prevent the warning in the first place