Skip to content

Commit a6faad4

Browse files
cgrandswannodette
authored andcommitted
fix caching collision between macros ns and regular ns in boostrap. CLJS-2088
1 parent 12c142c commit a6faad4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/main/cljs/cljs/core.cljs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10886,14 +10886,14 @@ reduces them without incurring seq initialization"
1088610886
[ns]
1088710887
(when (nil? NS_CACHE)
1088810888
(set! NS_CACHE (atom {})))
10889-
(let [the-ns (get @NS_CACHE ns)]
10889+
(let [ns-str (str ns)
10890+
ns (if (not ^boolean (gstring/contains ns-str "$macros"))
10891+
(symbol (str ns-str "$macros"))
10892+
ns)
10893+
the-ns (get @NS_CACHE ns)]
1089010894
(if-not (nil? the-ns)
1089110895
the-ns
10892-
(let [ns-str (str ns)
10893-
ns (if (not ^boolean (gstring/contains ns-str "$macros"))
10894-
(symbol (str ns-str "$macros"))
10895-
ns)
10896-
ns-obj (find-ns-obj ns)]
10896+
(let [ns-obj (find-ns-obj ns)]
1089710897
(when-not (nil? ns-obj)
1089810898
(let [new-ns (create-ns ns ns-obj)]
1089910899
(swap! NS_CACHE assoc ns new-ns)

0 commit comments

Comments
 (0)