sebastiw / edts

Erlang Development Tool Suite
GNU Lesser General Public License v3.0
355 stars 82 forks source link

WIP: Adapt to missing compilation time in BEAMs #219

Closed timclassic closed 7 years ago

timclassic commented 8 years ago

This WIP PR is intended to address #217.

I've created this WIP PR to gather feedback on the new implementation of module_modified_p/2 and the deletion of the time tuple from the proplist returned by do_get_module_info/2. In addition, I commented out the (now invalid) test, which should be replaced with a new one.

This change restores auto-complete functionality on my local Emacs. I do not know if this breaks other bits of functionality, and I do not know if the new code is 100% equivalent to the old behavior (though I'm not sure what other choice we have in Erlang/OTP 19).

This change is motivated by the following change in the Erlang/OTP 19 release:

  OTP-13504    Application(s): compiler

               *** POTENTIAL INCOMPATIBILITY ***

               The compiler will no longer put the compilation date
               and time into BEAM files. That means that two BEAM
               files compiled on the same computer from the same
               source code and compilation options will be identical.

               Note: If you want to find out whether a BEAM file on
               disk is different from the loaded code, compared the
               MD5 value obtained from Mod:module_info(md5) with the
               MD5 value obtained from beam_lib:md5(BeamFileForMod)
tjarvstrand commented 7 years ago

Hi! I put this commit into a branch and added a couple of small things so this is now merged. I'll close this issue now.

timclassic commented 7 years ago

Great, thanks!