Don't recursively prep project.

This commit is contained in:
Phil Hagelberg 2012-03-06 22:04:51 -08:00
parent 158355303e
commit f6f46c267e
2 changed files with 5 additions and 9 deletions

View file

@ -55,17 +55,11 @@
(if-not (:disable-injection project)
(conj (:injections project) hooke-injection)))
(def ^:dynamic *prepping?* false)
;; TODO: tasks which are in :prep-tasks should dissoc themselves
;; before calling eval-in-project!
(defn prep [project]
;; This must exist before the project is launched.
(.mkdirs (io/file (:compile-path project "/tmp")))
(when-not *prepping?*
(binding [*prepping?* true]
(doseq [task (:prep-tasks project)]
(main/apply-task task project [])))))
(main/apply-task task (dissoc project :prep-tasks) [])))
;; # Subprocess stuff

View file

@ -126,7 +126,9 @@ as command-line arguments."
(try
(let [form `(doseq [namespace# '~namespaces]
(println "Compiling" namespace#)
(clojure.core/compile namespace#))]
(clojure.core/compile namespace#))
project (update-in project [:prep-tasks]
(partial remove #{"compile"}))]
(.mkdirs (io/file (:compile-path project)))
;; TODO: should eval-in-project be allowed to return non-integers?
(if (zero? (eval/eval-in-project project form))