[CLJS-475] Node.js target fails with optimizations set to :none or :whitespace Created: 21/Feb/13 Updated: 01/Mar/13 |
|
| Status: | Open |
| Project: | ClojureScript |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Minor |
| Reporter: | Paul Gearon | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | Compiler, bug | ||
| Environment: |
Clojure 1.5.0-RC16 |
||
| Attachments: |
|
| Description |
|
Compiling a hello world program for Node.js works fine if using optimizations of :advanced or :simple, but if using :none or :whitespace then an error will be reported for either "goog undefined" or "goog.string" undefined respectively. The program is shown here: (ns pr.core) This program is in src/cljs/pr/core.cljs. The repl line used to compile is: When compiled with optimizations of :none, the output is: $ node src/js/pr.js /Users/pag/src/test/clj/pr/src/js/pr.js:1 — $ node src/js/pr.js /Users/pag/src/test/clj/pr/src/js/pr.js:493 — $ node src/js/pr.js — |
| Comments |
| Comment by Paul Gearon [ 21/Feb/13 4:40 PM ] |
|
Remaining generated files |
| Comment by David Nolen [ 25/Feb/13 3:46 PM ] |
|
This is a known bug. We need goog.require/provide to actually mean something to Node.js. I'm not sure how this can be made to work. I've been hoping for a patch for this since ClojureScript was first announced, but I haven't seen anything yet. |