Permalink
Browse files

CLJS-645: parse-ns needs to include 'constants-table as a dep

Did not having the constants-table as an implicit dependency on all
namespaces if cljs.analyzer/*track-constants* true. Minor refactor of
the logic in both compile-file* and parse-ns
  • Loading branch information...
1 parent 85ac96e commit ae1b8514770bbbf546576479ae28fa670917ab14 @swannodette swannodette committed Oct 29, 2013
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/clj/cljs/compiler.clj
@@ -872,10 +872,8 @@
:provides [ns-name]
:requires (if (= ns-name 'cljs.core)
(set (vals deps))
- (set
- (remove nil?
- (conj (set (vals deps)) 'cljs.core
- (when ana/*track-constants* 'constants-table)))))
+ (cond-> (conj (set (vals deps)) 'cljs.core)
+ ana/*track-constants* (conj 'constants-table)))
:file dest
:source-file src
:lines (+ @*cljs-gen-line*
@@ -918,7 +916,8 @@
:provides [ns-name]
:requires (if (= ns-name 'cljs.core)
(set (vals deps))
- (conj (set (vals deps)) 'cljs.core))
+ (cond-> (conj (set (vals deps)) 'cljs.core)
+ ana/*track-constants* (conj 'constants-table)))
:file dest
:source-file src}
(when (and dest (.exists ^File dest))

0 comments on commit ae1b851

Please sign in to comment.