Browse files

CLJS-788: spurious warnings about goog namespaces

Earliers version of the third party lib included populated
goog/deps.js. Add a simple hack to make sure we are considering the
canonical goog/deps.js file.
  • Loading branch information...
swannodette committed Apr 1, 2014
1 parent 81792d3 commit 7f93172bcfc8299493724c72e77ef5438932c1a2
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/clj/cljs/js_deps.clj
@@ -201,7 +201,10 @@
(letfn [(parse-list [s] (when (> (count s) 0)
(-> (.substring ^String s 1 (dec (count s)))
(string/split #"'\s*,\s*'"))))]
- (with-open [reader (io/reader (io/resource "goog/deps.js"))]
+ (with-open [reader (io/reader
+ (first
+ (filter (fn [res] (re-find #"\/google-closure-library\/" (.getPath res)))
+ (enumeration-seq (.getResources (ClassLoader/getSystemClassLoader) "goog/deps.js")))))]
(->> (line-seq reader)
(map #(re-matches #"^goog\.addDependency\(['\"](.*)['\"],\s*\[(.*)\],\s*\[(.*)\]\);.*" %))
(remove nil?)

0 comments on commit 7f93172

Please sign in to comment.