[erlang-questions] Feedback wanted: Remove compilation times from BEAM files in OTP 19?

Serge Aleynikov serge@REDACTED
Fri Apr 8 15:37:13 CEST 2016


​Thank you!

I updated the
https://github.com/saleyn/util/blob/master/src/user_default.erl per your
suggestion.

On Fri, Apr 8, 2016 at 8:54 AM, Björn Gustavsson <bjorn@REDACTED> wrote:

> On Fri, Apr 8, 2016 at 2:28 PM, Serge Aleynikov <serge@REDACTED>
> wrote:
> > I've been relying on module's compilation time for figuring out the
> changed
> > modules (see below).
> >
> > In the absence of {time, CompileTime}, would there be a way to determine
> the
> > modification time stamp of the file at the time it was loaded by code
> > loader?
>
> Yes. Use Mod:module_info(md5) to calculate MD5 for
> the loaded module and compare it to beam_lib:md5(Mod).
>
> Example:
>
> 13> c:module_info(md5).
> <<79,26,188,243,168,60,58,45,34,69,19,222,138,190,214,118>>
> 14> beam_lib:md5(code:which(c)).
> {ok,{c,<<79,26,188,243,168,60,58,45,34,69,19,222,138,
>          190,214,118>>}}
>
> /Bjorn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160408/0f69e1f5/attachment.htm>


More information about the erlang-questions mailing list