Permalink
Browse files

put the delay back

  • Loading branch information...
1 parent e2f7d95 commit cb50dd90159e523e150326ec3d187199857c828d Alex Baranosky committed Dec 23, 2012
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/slam/hound/regrow.clj
View
@@ -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

0 comments on commit cb50dd9

Please sign in to comment.