Skip to content

Commit 7f17d12

Browse files
committed
fix REPL issue w/ :refer-global usage in namespaces
found by trying to use cljs.proxy
1 parent 0b2fc96 commit 7f17d12

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,10 +1609,14 @@
16091609
;; even under Node.js where runtime require is possible
16101610
;; this is necessary - see CLJS-2151
16111611
(ns-list (cond->>
1612+
;; remove the global js namespace, it's not real
1613+
;; comes from :refer-global
16121614
;; remove external? foreign deps - they are already loaded
1613-
;; in the environment, there is nothing to do.
1614-
;; :require-global is the typical case here
1615-
(remove ana/external-dep? (deps/-requires input))
1615+
;; in the environment, there is nothing to do.
1616+
;; :require-global is the typical case here
1617+
(->> (deps/-requires input) ;; returns nses as strings, not symbols
1618+
(remove #{"js"})
1619+
(remove ana/external-dep?))
16161620
;; under Node.js we emit native `require`s for these
16171621
(= :nodejs (:target opts))
16181622
(filter (complement ana/node-module-dep?))))

0 commit comments

Comments
 (0)