[erlang-patches] [erlang-bugs] Properly handle export_all when looking for undefined callbacks

Anthony Ramine n.oxyde@REDACTED
Tue Oct 29 16:50:20 CET 2013


export_all means that everything is exported, so seeing a warning about an undefined behaviour callback is quite weird and surprising and confusing.

At the very least, the message should be changed when export_all is used, maybe something like "warning: callback is not explicitly exported".

I still think this is a bug, you use export_all during development to avoid exporting warnings and/or errors.

-- 
Anthony Ramine

Le 29 oct. 2013 à 16:07, Robert Virding <robert.virding@REDACTED> a écrit :

> Sorry I missed this one earlier. Do you mean EVERY callback or just those which haven't been explicitly exported and have been left to the export_all? If it is the latter case then I wouldn't consider this an error. Functions which are meant to be seen on the outside of a module should be explicitly exported, export_all is more a development/debugging hack. IMAO anyway. If it the first case where having an export_all means that no callback is seen then it is a bug.
> 
> Robert
> 
> ----- Original Message -----
>> From: "Fredrik" <fredrik@REDACTED>
>> 
>> On 10/12/2013 02:10 PM, Anthony Ramine wrote:
>>> Hello,
>>> 
>>> When compiling a behaviour with export_all, every callback is marked as
>>> missing by erl_lint. This patch fixes this.
>>> 
>>> Thanks to Michele Miron (Cc'd) for reporting this bug.
>>> 
>>> 	git fetch https://github.com/nox/otp.git export_all-behaviour
>>> 
>>> 	https://github.com/nox/otp/compare/erlang:maint...export_all-behaviour
>>> 	https://github.com/nox/otp/compare/erlang:maint...export_all-behaviour.patch
>>> 
>>> Regards,
>>> 
>> Hello Anthony,
>> I've fetched your patch, applied the correct bootstrap file and assigned
>> it to be reviewed by responsible developers.
>> Thanks,
>> 
>> --
>> 
>> BR Fredrik Gustafsson
>> Erlang OTP Team
>> 
>> _______________________________________________
>> erlang-bugs mailing list
>> erlang-bugs@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-bugs
>> 




More information about the erlang-patches mailing list