                                  (recur (:name ast) (next forms))
                                  (recur ns (next forms))))
                              ns))]
+                 (when cache
+                   (spit cache
+                     (str ";; Analyzed by ClojureScript " (util/clojurescript-version) "\n"
+                       (pr-str (get-in @env/*compiler* [::namespaces ns])))))
                  (swap! env/*compiler* assoc-in [::analyzed-cljs path] true)))))))))
 

         (let [path (if (instance? File res)
                      (.getPath ^File res)
                      (.getPath ^java.net.URL res))
               ;; cache (if output-dir
               ;;         (cache-file res output-dir))
               ]
           (when-not (get-in @env/*compiler* [::analyzed-cljs path])
             (binding [*cljs-ns* 'cljs.user
                       *cljs-file* path

            [clojure.tools.reader.reader-types :as readers])
  (:import java.lang.StringBuilder
           java.io.File
           java.net.URL
           [cljs.tagged_literals JSValue]))

(set! *warn-on-reflection* true)
