Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
put the delay back
  • Loading branch information
Alex Baranosky committed Dec 23, 2012
1 parent e2f7d95 commit cb50dd9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/slam/hound/regrow.clj
Expand Up @@ -90,14 +90,15 @@
(update-in ns-map [type] conj addition)
ns-map))

(defn- pre-load-namespaces []
(doseq [namespace (search/namespaces)
:when (not (re-find #"example|lancet$" (name namespace)))]
(try (with-out-str (require namespace))
(catch Throwable _))))
(defonce pre-load-namespaces
(delay
(doseq [namespace (search/namespaces)
:when (not (re-find #"example|lancet$" (name namespace)))]
(try (with-out-str (require namespace))
(catch Throwable _)))))

(defn regrow [[ns-map body]]
(pre-load-namespaces)
(force pre-load-namespaces)
(if (:slamhound-skip (:meta ns-map))
ns-map
(loop [ns-map ns-map
Expand Down

0 comments on commit cb50dd9

Please sign in to comment.