[erlang-questions] module reloading
Mon Apr 16 04:24:37 CEST 2018
Thanks for your reply! I can certainly understand that and appreciate
the system would be letting me know if I was trying to do that. But
the issue is that I was not trying to load any code of mine with the
same module name, I just tried reloading the same (e.g., math) module.
Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:2:2] [ds:2:2:10]
[async-threads:10] [hipe] [kernel-poll:false]
Eshell V9.3 (abort with ^G)
=ERROR REPORT==== 15-Apr-2018::22:09:00 ===
Can't load module 'math' that resides in sticky dir
As mentioned in my last email, the issue seems to be with the fact
that the module was not marked old...
Now, I just thought that c:l() would load and reload any module
regardless, but that doesn't seem to be the case.
On 4/13/2018 at 4:26 PM, "Joe Armstrong" wrote: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.
On Fri, Apr 13, 2018 at 7:13 PM, Alex Alvarez wrote:
> Sorry if this was already asked and I missed it... While using
> after I load a module...
> 11> l(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
> ...I get this error message. It's not particular to any module.
> error, there seems to be a problem with a stcky bit somewhere.
> don't remember having this problem before, who knows, maybe it's
> install. Has anyone run into this issue recently?
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions