Disable help summary output until Clojure bug #130 is fixed. =(

This commit is contained in:
Phil Hagelberg 2009-11-28 20:38:24 -08:00
parent 2a76567d9e
commit 15cbad9daf
2 changed files with 8 additions and 5 deletions

View file

@ -5,14 +5,17 @@
(def tasks (set (filter #(re-find #"^leiningen\.(?!core)" (name %))
(find-namespaces-on-classpath))))
;; affected by clojure ticket #130: bug of AOT'd namespaces losing metadata
(defn help-for [task]
(defn help-for
"Help for a task is stored in its docstring, or if that's not present,
in its namespace."
[task]
(let [task-ns (symbol (str "leiningen." task))
_ (require task-ns)
task (ns-resolve task-ns (symbol task))]
(or (:doc (meta task))
(:doc (meta (find-ns task-ns))))))
;; affected by clojure ticket #130: bug of AOT'd namespaces losing metadata
(defn help-summary-for [task-ns]
(require task-ns)
(let [task-name (last (.split (name task-ns) "\\."))]
@ -25,6 +28,7 @@
(do (println "Leiningen is a build tool for Clojure.\n")
(println "Several tasks are available:")
(doseq [task-ns tasks]
(println (help-summary-for task-ns)))
;; (println (help-summary-for task-ns))
(println " " (last (.split (name task-ns) "\\."))))
(println "\nRun lein help $TASK for details.")
(println "See http://github.com/technomancy/leiningen as well."))))

View file

@ -4,8 +4,7 @@
[clojure.contrib.java-utils :only [file as-properties]])
(:import [java.io StringWriter]
[org.apache.maven.model Model Parent Dependency Repository Scm]
[org.apache.maven.project MavenProject]
[org.apache.maven.artifact.ant Pom]))
[org.apache.maven.project MavenProject]))
(def #^{:doc "A notice to place at the bottom of generated files."} disclaimer
"\n<!-- This file was autogenerated by the Leiningen build tool.