deprecation warnings?

217 views
Skip to first unread message

William la Forge

unread,
Oct 14, 2015, 12:09:21 PM10/14/15
to Clojure
Going forward, I'd like to deprecate some functions and have a warning displayed on first use. So I've done this:

(def emptyAAMap ^{:deprecated "0.3.4"}
(new AAMap emptyNode {:comparator RT/DEFAULT_COMPARATOR}))

But I am not seeing any warnings from either lein or cursive. Do I need to add a plugin?

Thanks!

Colin Yates

unread,
Oct 14, 2015, 12:11:21 PM10/14/15
to clo...@googlegroups.com
Isn’t meta data before the symbol name?

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William la Forge

unread,
Oct 14, 2015, 12:31:44 PM10/14/15
to Clojure
OK, but

1. Still no warning from cursive or lein test and
2. I think the metadata goes after the arguments when defining multi-arity functions.

You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/sWUz7VGLv_o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.

Andy Fingerhut

unread,
Oct 14, 2015, 1:05:16 PM10/14/15
to clo...@googlegroups.com
Try out the Eastwood Clojure lint tool [1] and see if it gives deprecation warnings where you hope to see them.

Andy

Alex Miller

unread,
Oct 14, 2015, 1:44:44 PM10/14/15
to Clojure
You might wish to up-vote http://dev.clojure.org/jira/browse/CLJ-706 

William la Forge

unread,
Oct 14, 2015, 1:55:44 PM10/14/15
to Clojure
*warn-on-deprecated* would be super! :D

On Wed, Oct 14, 2015 at 1:44 PM, Alex Miller <al...@puredanger.com> wrote:
You might wish to up-vote http://dev.clojure.org/jira/browse/CLJ-706 

--

Colin Fleming

unread,
Oct 14, 2015, 6:02:24 PM10/14/15
to clo...@googlegroups.com
Sadly Cursive doesn't show this right now - it definitely should, though.

Cheers,
Colin

You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.

Brian Marick

unread,
Oct 17, 2015, 12:38:37 PM10/17/15
to clo...@googlegroups.com


William la Forge wrote:
> Going forward, I'd like to deprecate some functions and have a warning
> displayed on first use. So I've done this:

I use defprecate https://github.com/alexander-yakushev/defprecated

William la Forge

unread,
Oct 17, 2015, 12:58:31 PM10/17/15
to Clojure
Overkill for me right now. I need to delete the deprecated functions in the subsequent release anyway so this is a short-lived issue, this time at least. Plus, I suspect the aatree library is not yet in heavy use. (But I can dream, can't I?)

I had looked at the defprecated project but it got mixed in with too many other things from the same web search, so I wanted clarity on common practice. And I really want to keep the dependencies as light as possible, since this is a low-level library.

In any case, thanks Brian!

Lars Andersen

unread,
Oct 19, 2015, 11:54:04 AM10/19/15
to Clojure
Font-locking of deprecated vars was just added to CIDER.  It's available in snapshots now, and will be included in 0.10.

James Elliott

unread,
Oct 20, 2015, 9:42:44 PM10/20/15
to Clojure
Sweet, I’m starting to really look forward to that release. :D

Bozhidar Batsov

unread,
Oct 21, 2015, 2:40:19 AM10/21/15
to clo...@googlegroups.com
You should! It will be the biggest and greatest CIDER release ever. It will likely be the most postponed release ever as well. :-)

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages