[erlang-questions] module reloading

Joe Armstrong erlang@REDACTED
Fri Apr 13 22:26:24 CEST 2018


The module called 'math' is a pre-defined system module, and
redefining it might have
unpleasant and unpredictable consequences - so you really should not
do this unless you
know exactly what you are doing. Best is to just change the name.

If you know what you're doing you can call unstick_dir on the
directory where math.beam was loaded from
and then you will be able to change the code - again this is not a
good idea if you don't
really understand the consequences of doing this.

System modules are 'sticky' by default to stop you from accidentally
shooting yourself in the foot.

If you get this warning just change the module name.

Cheers

/Joe

On Fri, Apr 13, 2018 at 7:13 PM, Alex Alvarez <alex@REDACTED> wrote:
> Sorry if this was already asked and I missed it...  While using v20.3.2,
> after I load a module...
>
> 11> l(math).
> {module,math}
>
> ...if I try to reload it again with the same command...
>
> 12> l(math).
>
> =ERROR REPORT==== 13-Apr-2018::13:09:15 ===
> Can't load module 'math' that resides in sticky dir
> {error,sticky_directory}
>
> ...I get this error message. It's not particular to any module.  From the
> error, there seems to be a problem with a stcky bit somewhere.  Although I
> don't remember having this problem before, who knows, maybe it's just my
> install.  Has anyone run into this issue recently?
>
> Thanks,
> Alex
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list