 
 (defn fetch-source
   [{:keys [verbose read-file-fn!]} var paths-to-try cb]
-  (load/read-files-and-callback! verbose
-                                 paths-to-try
-                                 read-file-fn!
-                                 (fn [result]
-                                   (if result
-                                     (let [source (:source result)
-                                           rdr (rt/source-logging-push-back-reader source)]
-                                       (dotimes [_ (dec (:line var))] (rt/read-line rdr))
-                                       (-> (r/read {:read-cond :allow :features #{:cljs}} rdr)
-                                           meta
-                                           :source
-                                           common/wrap-success
-                                           cb))
-                                     (cb (common/wrap-success "nil"))))))
+  (if read-file-fn!
+    (load/read-files-and-callback! verbose
+                                   paths-to-try
+                                   read-file-fn!
+                                   (fn [result]
+                                     (if result
+                                       (let [source (:source result)
+                                             rdr (rt/source-logging-push-back-reader source)]
+                                         (dotimes [_ (dec (:line var))] (rt/read-line rdr))
+                                         (-> (r/read {:read-cond :allow :features #{:cljs}} rdr)
+                                             meta
+                                             :source
+                                             common/wrap-success
+                                             cb))
+                                       (cb (common/wrap-success "nil")))))
+    (do (when verbose
+          (common/debug-prn "No :read-file-fn! provided, skipping source fetching..."))
+        (cb (common/wrap-success "nil")))))
 
 (defn process-source
   [opts cb data sym]

  [opts]
  (let [verbose? (:verbose opts)
        read-file! (:read-file-fn! opts)]
    (when verbose?
      (common/debug-prn "Discovering goog/deps.js in" (:src-paths opts)))
    (doseq [path (:src-paths opts)]
      (let [goog-deps-path (str (common/normalize-path path) "goog/deps.js")]
        (read-file! goog-deps-path
                    (fn [content]
                      (when content
                        (do (when verbose?
                              (common/debug-prn "Found valid" goog-deps-path))
                            (swap! app-env
                                   update :goog-provide->path
                                   merge (goog-deps-map content))))))))))

(defn init-repl!
  "The init-repl function. It uses the following opts keys:

  [opts user-opts]
  (assoc opts :load-fn!
         (or (:load-fn! user-opts)
             ;; AR - make-load-fn will validate :src-paths/:read-file-fn!
             (make-load-fn (:verbose user-opts)
                           (:src-paths user-opts)
                           (:read-file-fn! user-opts)))))

(defn add-init-fns
  "Given current and user options, returns a map containing a
