                                     m)) {} require)
         require-mappings (reduce (fn [m [ns {:keys [refer]}]]
                                    (ensure-loaded ns env)
+                                   ;; TODO: handle (:require [goog.lib :refer [things]]) ?
                                    (reduce #(assoc %1 %2 (get-in (env/deref-env)
                                                                  [:namespaces ns :mappings %2])) m refer))
                                  {} require)

(declare analyze-ns)
(defn ensure-loaded [ns env]
  (or (-> (env/deref-env) :namespaces ns)
      (analyze-ns ns)))

(defn core-macros []

             [analyze-host-expr :refer [analyze-host-expr]]]
            [clojure.tools.analyzer.js.utils
             :refer [desugar-ns-specs validate-ns-specs ns-resource source-path res-path]]
            [cljs
             [tagged-literals :as tags]
             [js-deps :as deps]]
            [clojure.java.io :as io]
            [clojure.tools.reader :as reader]
            [clojure.tools.reader.reader-types :as readers])
  (:import cljs.tagged_literals.JSValue)
