Permalink
Browse files

main.clj: deprecation warning w/ usage for legacy repl/script; refs #218

Signed-off-by: Rich Hickey <richhickey@gmail.com>
  • Loading branch information...
1 parent 3e81362 commit 2cc710e7aeaab08e0739debe21e2cc6b7020e1b1 @stuartsierra stuartsierra committed with Dec 17, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/clj/clojure/main.clj
View
@@ -291,13 +291,19 @@
"Called by the clojure.lang.Repl.main stub to run a repl with args
specified the old way"
[args]
+ (println "WARNING: clojure.lang.Repl is deprecated.
+Instead, use clojure.main like this:
+java -cp clojure.jar clojure.main -i init.clj -r args...")
(let [[inits [sep & args]] (split-with (complement #{"--"}) args)]
(repl-opt (concat ["-r"] args) (map vector (repeat "-i") inits))))
(defn- legacy-script
"Called by the clojure.lang.Script.main stub to run a script with args
specified the old way"
[args]
+ (println "WARNING: clojure.lang.Script is deprecated.
+Instead, use clojure.main like this:
+java -cp clojure.jar clojure.main -i init.clj script.clj args...")
(let [[inits [sep & args]] (split-with (complement #{"--"}) args)]
(null-opt args (map vector (repeat "-i") inits))))

0 comments on commit 2cc710e

Please sign in to comment.