You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's easier to show an example:
{code:erlang}
-module(overload).
-export([foo/0]).
foo() -> ?MODULE:foo().
{code}
{code:bash}
overload.erl:4: Warning: overload:foo/0: removed in OTP 19
{code}
(Because there was indeed a module {{overload}} in {{sasl}} and it's now deprecated. But *this* {{overload}} is different module.)
There seems to be no way to silence the warning.
The text was updated successfully, but these errors were encountered:
As there is a flat name space for modules the OTP team would like to have the opportunity to chose short functional names and
other users are recommended to use a prefix in their names.
overload in this case might be a name we want to use again in OTP and because of that you can think of it as reserved for
use in OTP. The warning should then be changed to something like "reserved for OTP" after first having been "removed" for 2 major releases.
But maybe it should be possible to turn off the warning with -compile(nowarn_deprecated_function) which is not the case today (and I think that is a bug that
we should correct).
So I suggest that you name you module with a prefix in front of overload. Most modules belong to an OTP application and the common practice it to name the modules with an application prefix.
Backstory: riak_test contains a _test_ named overload. So if you compile with {{+warnings_as_errors}} you are stuck, it won’t compile no matter what {{-compile(…)}} trickery you add do it.
Of course I renamed it.
So this bug is more for a reference. (Although a way to turn off the warning would be really nice to have.)
The following pull request removes the warning for the {{overload}} module and introduces options for suppressing warnings about removed functions and modules:
https://github.com/erlang/otp/pull/2200
Original reporter:
lelf
Affected version:
OTP-22.0
Fixed in version:
OTP-22.0
Component:
compiler
Migrated from: https://bugs.erlang.org/browse/ERL-904
The text was updated successfully, but these errors were encountered: