<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 12, 2018 at 9:06 PM, Jesper Louis Andersen <span dir="ltr"><<a href="mailto:jesper.louis.andersen@gmail.com" target="_blank">jesper.louis.andersen@gmail.<wbr>com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><span><div dir="ltr">On Mon, Feb 12, 2018 at 6:58 PM Joe Armstrong <<a href="mailto:erlang@gmail.com" target="_blank">erlang@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
I have said on many occasions that code should be named by the SHA1 checksum of<br>
the content - as far as I know this would not offend people - apart<br>
from those who thought the name could be a tad simpler.<br>
<br></blockquote><div><br></div></span><div>I might have said this before, but here goes:</div><div>Using a cryptographic checksum for a package and then pointing the name to the checksum would have saved Node.js npm package manager a lot of headaches when people remove, rename or otherwise destroy packages.<br></div><div>It also allows you to comply with legal requests with a sunset period. As in "I hear you, and the name will be given to you. But we give people 6 months time to upgrade before we remove the old checksummed packages".<br></div><div>I'm interested in why someone did not try this yet. Or if one tried, why it didn't work out. It seems very obvious to build a content-addressable-store for your packages.<br></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">I'm not sure I understand this completely. Using the checksum of a package as identifier is IMHO only useful if it is used in the dependencies list of other packages. If the deps list uses names (and people will use names anyway, not checksums), then the problem remains that in case a package is renamed and another one reuses the name, we don't know to which one a reference points. </div><div class="gmail_extra"><br></div><div class="gmail_extra">Anyway, <a href="http://hex.pm">hex.pm</a> has a field named "checksum" and it is that value that is stored in rebar.lock. So the hash key is there, but I don't see how it is useful except for tools. </div><div class="gmail_extra"><br></div><div class="gmail_extra">best regards,</div><div class="gmail_extra">Vlad</div><div class="gmail_extra"><br></div></div>