From the mailing list
http://groups.google.com/group/clojure/msg/c41d909bd58e4534. It is easy to use deprecated namespaces or vars without knowing you are doing so. The documentation warnings are small, and there is no compiler warning.
*Proposed:*
* Add new {{\*warn-on-deprecated*}} dynamic var, defaulted to false
* Warn to stderr when {{{:deprecated true}}} namespace is loaded.
* Warn to stderr when {{{:deprecated true}}} var is analyzed.
* Warn to stderr when {{{:deprecated true}}} macro is expanded.
* New system property clojure.compiler.warn-on-deprecated
* Compile Clojure itself with clojure.compiler.warn-on-deprecated
* Fix deprecation warnings inside Clojure (replicate, clear-agent-errors)
* Mark clojure.parallel as deprecated with :deprecation tag
Examples:
(set! *warn-on-deprecated* true)
;; use of a deprecated var (on compile)
(defn ^:deprecated f [x] x)
(f 5)
;;=> Deprecation warning, NO_SOURCE_PATH:7:1 : var #'user/f is deprecated
;; use of a deprecated macro (on macro expansion)
(defmacro ^:deprecated m [x] x)
(m 5)
;;=> Deprecation warning, NO_SOURCE_PATH:7:1 : macro #'user/m is deprecated
;; use of a deprecated namespace (on load)
(ns foo {:deprecated "1.1"})
(ns bar (:require foo))
;;=> Deprecation warning: loading deprecated namespace `foo` from namespace `bar`
*Patch:* 706-deprecated-ns-var-warnings-tested-3.diff
*Questions:* Should default for deprecation warnings be true instead? People upgrading are likely to see new warnings which might be surprising.
* Should default be to warn or not warn on deprecated?