Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #6493 - ehuss:fix-fingerprint-patch, r=alexcrichton
Fix fingerprint calculation for patched deps. If you have A→B→C where B and C are in a registry, and you `[patch]` C, the fingerprint calculation wasn't working correctly when C changes. The following sequence illustrates the problem: 1. Do a build from scratch. 2. Touch a file in C. 3. Build again. Everything rebuilds as expected. 4. Build again. You would expect this to be all fresh, but it rebuilds A. The problem is the hash-busting doesn't propagate up to parents from dependencies. Normal targets normally aren't a problem because they have a `LocalFingerprint::MtimeBased` style local value which always recomputes the hash. However, registry dependencies have a `Precalculated` style local value which never recomputes the hash. The solution here is to always recompute the hash. This shouldn't be too expensive, and is only done when writing the fingerprint, which should only happen when the target is dirty. I'm not entirely certain why the caching logic was added in #4125. Fixes rust-lang/rust#57142
- Loading branch information