Skip to content

Commit

Permalink
main.clj: deprecation warning w/ usage for legacy repl/script; refs #218
Browse files Browse the repository at this point in the history
Signed-off-by: Rich Hickey <richhickey@gmail.com>
  • Loading branch information
Stuart Sierra authored and richhickey committed Dec 17, 2009
1 parent 3e81362 commit 2cc710e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/clj/clojure/main.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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))))

Expand Down

0 comments on commit 2cc710e

Please sign in to comment.