Remove deprecated :repl-init-script.

This commit is contained in:
Phil Hagelberg 2012-01-10 22:13:14 -08:00
parent c0adabb208
commit f8708a445d
3 changed files with 5 additions and 14 deletions

4
.gitignore vendored
View file

@ -1,6 +1,4 @@
test_projects/*/lib test_projects/*/target
test_projects/*/classes/
test_projects/*/nomnomnom*.jar
test_projects/sample/pom.xml test_projects/sample/pom.xml
classes/ classes/
lib/ lib/

View file

@ -14,6 +14,6 @@ Raise an exception if any deletion fails unless silently is true."
(delete-file f silently))) (delete-file f silently)))
(defn clean (defn clean
"Remove all files from project's target-dir." "Remove all files from project's target-path."
[project] [project]
(delete-file-recursively (:target-path project) :silently)) (delete-file-recursively (:target-path project) :silently))

View file

@ -14,18 +14,11 @@
(defn repl-options [project options] (defn repl-options [project options]
(let [options (apply hash-map options) (let [options (apply hash-map options)
init `#(let [is# ~(:repl-init-script project) init `#(let [in# '~(:repl-init project)
in# '~(:repl-init project)
mn# '~(:main project)] mn# '~(:main project)]
~(:init options) ~(:init options)
(when (and is# (.exists (File. (str is#)))) (when in# (require in#))
(println (str "Warning: :repl-init-script is " (when mn# (require mn#))
"deprecated; use :repl-init."))
(load-file is#))
(when in#
(require in#))
(when mn#
(require mn#))
(in-ns (or in# mn# '~'user))) (in-ns (or in# mn# '~'user)))
;; Suppress socket closed since it's part of normal operation ;; Suppress socket closed since it's part of normal operation
caught `(fn [t#] caught `(fn [t#]