Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 2cc710e

Browse files
Stuart Sierrarichhickey
authored andcommitted
main.clj: deprecation warning w/ usage for legacy repl/script; refs #218
Signed-off-by: Rich Hickey <richhickey@gmail.com>
1 parent 3e81362 commit 2cc710e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/clj/clojure/main.clj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,19 @@
291291
"Called by the clojure.lang.Repl.main stub to run a repl with args
292292
specified the old way"
293293
[args]
294+
(println "WARNING: clojure.lang.Repl is deprecated.
295+
Instead, use clojure.main like this:
296+
java -cp clojure.jar clojure.main -i init.clj -r args...")
294297
(let [[inits [sep & args]] (split-with (complement #{"--"}) args)]
295298
(repl-opt (concat ["-r"] args) (map vector (repeat "-i") inits))))
296299

297300
(defn- legacy-script
298301
"Called by the clojure.lang.Script.main stub to run a script with args
299302
specified the old way"
300303
[args]
304+
(println "WARNING: clojure.lang.Script is deprecated.
305+
Instead, use clojure.main like this:
306+
java -cp clojure.jar clojure.main -i init.clj script.clj args...")
301307
(let [[inits [sep & args]] (split-with (complement #{"--"}) args)]
302308
(null-opt args (map vector (repeat "-i") inits))))
303309

0 commit comments

Comments
 (0)