[erlang-questions] how to create compile warning for deprecated functions?

Ahmed Omar <>
Tue Mar 22 16:16:12 CET 2011


True, it's hard coded, in otp_internal.erl under stdlib

On Tue, Mar 22, 2011 at 4:03 PM, Eric Merritt <>wrote:

> Coax,
>
>  At the moment you can't. There is a deprecated attribute that you can
> add to modules, but the only thing that uses it is the xref tool as
> Niclas said. The deprecated list that the complier uses is a hard
> coded list that (I assume) is manually updated for each release.
>
> Hopefully, that will change in the future, but for now the options are
> to use xref. This deprecated flag is document in the xref
> documentation.
>
> Eric
>
> On Tue, Mar 22, 2011 at 4:16 AM, caox <> wrote:
> > Hi,
> >
> >        I have some lib functions will be deprecated in next release of
> our repo. How could I add a warning during compiling for other developers
> just as the module regexp does:
> >
> > src/lib/email/add_phone.erl:23: Warning: regexp:split/2: the regexp
> module is deprecated (will be removed in R15A); use the re module instead
> >
> > regards,
> > caox
> > ________________________________________________________________
> > erlang-questions (at) erlang.org mailing list.
> > See http://www.erlang.org/faq.html
> > To unsubscribe; mailto:
> >
> >
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
>
>


-- 
Best Regards,
- Ahmed Omar
http://nl.linkedin.com/in/adiaa
Follow me on twitter
@spawn_think <http://twitter.com/#!/spawn_think>


More information about the erlang-questions mailing list