marking functions as obsolete/deprecated

Lennart Ohman <>
Mon Jan 23 10:07:55 CET 2006


Hi,
I believe the problem is that there is no compile-time linking
of the modules. The compiler does not "follow" global calls
to make sure they are "correct". That is why the obsolete
attribute can only work with tools considering a set of modules,
like xref does.

Best Regards,
Lennart


-------------------------------------------------------------
Lennart Ohman                   office  : +46-8-587 623 27
Sjoland & Thyselius Telecom AB  cellular: +46-70-552 67 35
Sehlstedtsgatan 6               fax     : +46-8-667 82 30
SE-115 28, STOCKHOLM, SWEDEN    email   : 

-----Original Message-----
From: 
[mailto:] On Behalf Of Fredrik Thulin
Sent: Monday, January 23, 2006 9:43 AM
To: 
Subject: marking functions as obsolete/deprecated

Hi

Is there any way I can mark (exported) functions in a module as obsolete 
or deprecated, and have the compiler issue a warning about it?

OTP seems to use static bits in otp_internal.erl to do this, but that 
options isn't exactly available to me. There is the module attribute 
tag 'deprecated', but it seems to only be used by 'xref' and not the 
compiler/linter.

Thanks in advance

/Fredrik





More information about the erlang-questions mailing list