]> git.proxmox.com Git - cargo.git/commitdiff
Auto merge of #8473 - alexcrichton:fix-fingerprint-loc, r=ehuss
authorbors <bors@rust-lang.org>
Thu, 9 Jul 2020 15:50:43 +0000 (15:50 +0000)
committerbors <bors@rust-lang.org>
Thu, 9 Jul 2020 15:50:43 +0000 (15:50 +0000)
Avoid colliding with older Cargo fingerprint changes

The fingerprint format Cargo stores changed recently in a way that
older Cargos cannot understand. Unfortunately though older Cargos are
colliding on some compilation units trying to read the new format and
they're bailing out. This commit fixes this issue by ensuring that the
location for fingerprint metadata is different in older Cargos and newer
Cargos.

Fingerprint metadata is always stored in a location with a hash in the
file name. This hash typically includes the hash of rustc's version
information itself, but for units which don't have a `Metadata` it's a
much simpler hash which is much more likely to collide with other
versions of Cargo. The fix in this commit is to extract the metadata
version that we're hashing to a constant, and then also hash it for
generating a filesystem location to house fingerprint data for a unit
that has no `Metadata`.

Closes #8472
Closes #8298


Trivial merge