Skip to content

[beta] Avoid colliding with older Cargo fingerprint changes - #8488

Merged
alexcrichton merged 1 commit into
rust-lang:rust-1.46.0from
ehuss:beta-fix-fingerprint-loc
Jul 15, 2020
Merged

alexcrichton merged 1 commit into
rust-lang:rust-1.46.0from
ehuss:beta-fix-fingerprint-loc

Conversation

@ehuss

@ehuss ehuss commented Jul 15, 2020

Copy link
Copy Markdown
Contributor

Beta backport of #8473.

The breaking change was introduced in 1.46, so I'd like to avoid it hitting stable.

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 rust-lang#8472
Closes rust-lang#8298
@rust-highfive

Copy link
Copy Markdown

r? @Eh2406

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive

Copy link
Copy Markdown

⚠️ Warning ⚠️

  • Pull requests are usually filed against the master branch for this repo, but this one is against rust-1.46.0. Please double check that you specified the right target!

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 15, 2020
@Eh2406

Eh2406 commented Jul 15, 2020

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Jul 15, 2020

Copy link
Copy Markdown
Contributor

📌 Commit c810ed0 has been approved by Eh2406

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 15, 2020
@bors

bors commented Jul 15, 2020

Copy link
Copy Markdown
Contributor

⌛ Testing commit c810ed0 with merge 10fcbaa43aa385625c6e3b0aac6d05be78b40dc7...

@alexcrichton

Copy link
Copy Markdown
Member

I think bors is listening to github actions now so I'm going to merge manually.

@alexcrichton
alexcrichton merged commit 4481ef5 into rust-lang:rust-1.46.0 Jul 15, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 23, 2020
…acrum

[beta] Update cargo

2 commits in 4f74d9b2a771c58b7ef4906b2668afd075bc8081..149022b1d8f382e69c1616f6a46b69ebf59e2dea
2020-07-08 17:13:00 +0000 to 2020-07-17 16:39:39 -0400
- [beta] Revert "Improve support for non-`master` main branches" (rust-lang/cargo#8503)
- [beta] Avoid colliding with older Cargo fingerprint changes (rust-lang/cargo#8488)
@ehuss ehuss added this to the 1.46.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants