I'm new here, hi.

I'm trying to get Source Maps working in Chrome. When I use David Nolan's mies 
minimal project (http://git.io/aGBirg), I get a correct "Hello, world!" in the 
console, and that maps to clojurescript code, so yay for that. However, IMO, 
it's mapping to the wrong code. 

For reference, here's the original source tree created by `lein new mies once`:

.
├── index.html
├── project.clj
└── src
    └── hello
        └── core.cljs

And after a `lein cljsbuild once`, it's

.
├── hello.js
├── index.html
├── out
│   ├── cljs
│   │   ├── core.cljs
│   │   ├── core.js
│   │   └── core.js.map
│   ├── goog
│   │   // ... stuff here ...
│   └── hello
│       ├── core.cljs
│       ├── core.js
│       └── core.js.map
├── project.clj
└── src
    └── hello
        └── core.cljs


IMO, "Hello, world!" in the console should be mapping to this line in 
out/hello/core.cljs:

(println "Hello world!")

Instead, it's mapping to line 55 of out/cljs/core.cljs, which what println is 
calling, which is the last line of this defn:

(defn enable-console-print!
  "Set *print-fn* to console.log"
  []
  (set! *print-newline* false)
  (set! *print-fn*
    (fn [& args]
      (.apply js/console.log js/console (into-array args)))))   ;; <-- this line

I know this is what println is calling, but ... is this expected behavior?

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to