Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

CLJS-676: source maps broken under incremental compilation

Use :cljs.compiler/compiled-cljs key in cljs.closure/optimize for
generating the source map. Use the destination path as the key as we do
for :cljs.closure/compiled-cljs.
  • Loading branch information...
commit 44c932a1b852818e0b364d0639083c394101f48f 1 parent d929ae9
@swannodette swannodette authored
Showing with 9 additions and 9 deletions.
  1. +1 −1  src/clj/cljs/closure.clj
  2. +8 −8 src/clj/cljs/compiler.clj
View
2  src/clj/cljs/closure.clj
@@ -748,7 +748,7 @@
relpaths))
(if-let [url (:url source)]
(let [path (.getPath ^URL url)]
- (if-let [compiled (get-in @env/*compiler* [::compiled-cljs path])]
+ (if-let [compiled (get-in @env/*compiler* [::comp/compiled-cljs path])]
(if-let [source-url (:source-url source)]
(assoc merged (.getPath ^URL source-url)
(sm/merge-source-maps
View
16 src/clj/cljs/compiler.clj
@@ -909,7 +909,7 @@
(sm/encode {(url-path src) (:source-map sm-data)}
{:lines (+ (:gen-line sm-data) 2)
:file (url-path dest)}))))
- (swap! env/*compiler* update-in [::compiled-cljs] assoc (.getAbsolutePath ^File src) ret)
+ (swap! env/*compiler* update-in [::compiled-cljs] assoc (.getAbsolutePath ^File dest) ret)
ret)))))))))
(defn compiled-by-version [^File f]
@@ -925,14 +925,14 @@
(env/ensure
(or (not (.exists dest))
(> (.lastModified src) (.lastModified dest))
- (let [version' (compiled-by-version dest)
- version (clojurescript-version)]
- (and version (not= version version')))
- (and opts
+ (let [version' (compiled-by-version dest)
+ version (clojurescript-version)]
+ (and version (not= version version')))
+ (and opts
(:source-map opts)
- (if (= (:optimizations opts) :none)
- (not (.exists (io/file (str (.getPath dest) ".map"))))
- (not (get-in @env/*compiler* [::compiled-cljs (.getAbsolutePath src)]))))))))
+ (if (= (:optimizations opts) :none)
+ (not (.exists (io/file (str (.getPath dest) ".map"))))
+ (not (get-in @env/*compiler* [::compiled-cljs (.getAbsolutePath dest)]))))))))
(defn parse-ns
([src] (parse-ns src nil nil))
Please sign in to comment.
Something went wrong with that request. Please try again.