             (recur fs))
         (close! out)))
     (async/into [] out)))
-
-(defn add-request-url [{:keys [url-rewriter] :as opts} {:keys [file] :as file-msg}]
-  (let [resolved-path (resolve-url file-msg)]
-    (assoc file-msg :request-url
-           (if url-rewriter
-             (url-rewriter resolved-path)
-             resolved-path))))
-
-(defn add-request-urls [opts files]
-  (map (partial add-request-url opts) files))
 
 (defn eval-body [{:keys [eval-body file]} opts]
   (when (and eval-body (string? eval-body))

  (dev-assert (string? url))
  (.makeUnique (guri/parse url)))

(defn ns-to-js-file [ns]
  (dev-assert (string? ns))
  (str (string/replace ns "." "/") ".js"))

(defn fix-node-request-url [url]
  (if (gstring/startsWith url "../")
    (string/replace url "../" "")
    (str "goog/" url)))

(def resolve-ns
  (condp = (utils/host-env?)
    :node
    (fn [ns]
      (dev-assert (string? ns))
      (fix-node-request-url (aget js/goog.dependencies_.nameToPath ns)))
    (fn [ns]
      (dev-assert (string? ns))
      (str (utils/base-url-path) "goog/"
           (aget js/goog.dependencies_.nameToPath ns)))))

(defn bootstrap-goog-base
  "Reusable browser REPL bootstrapping. Patches the essential functions

      (when (not-empty eval-bodies)
        (doseq [eval-body-file eval-bodies]
          (eval-body eval-body-file opts))))
    (reset! dependencies-loaded (list))
    (let [all-files (filter #(and (:namespace %)
                                  (not (:eval-body %)))
                            files)
          res'    (<! (load-all-js-files all-files))
          res     (filter :loaded-file res')
          files-not-loaded  (filter #(not (:loaded-file %)) res')
          dependencies-that-loaded (filter :loaded-file @dependencies-loaded)]
      (when (not-empty dependencies-that-loaded)
        (utils/log :debug "Figwheel: loaded these dependencies")
        (utils/log (pr-str (map (fn [{:keys [request-url]}]
                                  (string/replace request-url goog/basePath ""))
                                (reverse dependencies-that-loaded)))))      
      (when (not-empty res)
        (utils/log :debug "Figwheel: loaded these files")
        (utils/log (pr-str (map (fn [{:keys [namespace file]}]
                                  (if namespace
                                    (name->path (name namespace))
                                    file)) res)))
        (js/setTimeout #(do
                          (on-jsload-custom-event res)
                          (apply on-jsload [res])) 10))
      
      (when (not-empty files-not-loaded)
        (utils/log :debug "Figwheel: NOT loading these files ")
        (let [{:keys [figwheel-no-load not-required]}
