make use of deprecated namespaces/vars easier to spot

Description

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:

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?

Environment

None

Assignee

Cezary Kosko

Reporter

Stuart Halloway

Labels

Approval

Prescreened

Patch

Code and Test

Priority

Major
Configure