Skip to content

Commit ace9da3

Browse files
mfikesdnolen
authored andcommitted
CLJS-1580: Self-host: goog.provide offsets source-maps
When goog.provide is emitted as a result of processing :ns :op, this modification to the JavaScript offsets the lines in that file by one, thus messing up source mapping lines, if enabled. Instead of simply using str to generate the line, use comp/emitln, which internally does the proper accounting with respect to source maps.
1 parent 0ec3e83 commit ace9da3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/cljs/cljs/js.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@
732732
(if (= :ns (:op ast))
733733
(do
734734
(.append sb
735-
(str "goog.provide(\"" (munge (:name ast)) "\");\n"))
735+
(with-out-str (comp/emitln (str "goog.provide(\"" (munge (:name ast)) "\");"))))
736736
(ns-side-effects true bound-vars aenv ast opts
737737
(fn [res]
738738
(if (:error res)

0 commit comments

Comments
 (0)