Wrap checkout-deps read-project with more useful message. Fixes #85.

This commit is contained in:
Phil Hagelberg 2010-08-08 14:33:37 -07:00
parent 9a1ea45d23
commit d0e1678b34
2 changed files with 13 additions and 8 deletions

View file

@ -13,12 +13,17 @@
;; bin/lein and thus can't be changed in project.clj.
(.listFiles (file (:root project) "lib/dev")))))
(defn- read-dependency-project [dep]
(let [project (.getAbsolutePath (file dep "project.clj"))]
(try (read-project project)
(catch Exception e
(throw (Exception. (format "Problem loading %s" project) e))))))
(defn checkout-deps-paths [project]
(apply concat (for [dep (.listFiles (file (:root project) "checkouts"))]
;; Note that this resets the leiningen.core/project var!
(let [proj (binding [*ns* (find-ns 'leiningen.core)]
(read-project (.getAbsolutePath
(file dep "project.clj"))))]
(read-dependency-project dep))]
(for [d [:source-path :compile-path :resources-path]]
(proj d))))))

View file

@ -6,9 +6,6 @@
Leiningen TODOs
* For 1.4.0 or later
** TODO lein install $PROJECT (works outside project root)
Possibly take some of this from cljr?
** TODO write shell wrappers on install
** TODO lein add $DEPENDENCY (inserts it into :dependencies in project.clj)
** TODO classifiers for specifying what clojure version to use?
** TODO test classification using metadata; run a subset of tests
@ -17,9 +14,12 @@ Leiningen TODOs
** TODO set arbitrary jar metadata
** TODO specify min. lein version in project.clj
* For 1.3.0
** TODO errors in read-project should show filename
** TODO user-level plugin installation and activation
** TODO user-level config file (with hook list)
** TODO lein install $PROJECT (works outside project root)
Possibly take some of this from cljr?
** TODO write shell wrappers on install
** DONE errors in read-project should show filename
** DONE user-level plugin installation and activation
** DONE user-level config file (with hook list)
** DONE get no-project-needed from arglist
** DONE argument chaining
** DONE interactive task