]> git.proxmox.com Git - cargo.git/commit
Auto merge of #6734 - ehuss:fingerprint-build-path-only, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 11 Mar 2019 18:51:14 +0000 (18:51 +0000)
committerbors <bors@rust-lang.org>
Mon, 11 Mar 2019 18:51:14 +0000 (18:51 +0000)
commitdd761226d944712a363ea515cb294f4e2b6bdbe5
treeca668275239c09c775ef6e71a10fc7a705a097cf
parentd74d879d63c0be7cd87a29fd23229b58dfceb754
parent5e7b50a0df94ebff20ac7317bb66dcd0d5b076ce
Auto merge of #6734 - ehuss:fingerprint-build-path-only, r=alexcrichton

Fingerprint build script deps only for path packages.

#6720 introduced some protection that if there is a build script, and two commands are used (such as `cargo build` then `cargo test`), the second command would correctly get rebuilt. However, the way it was implemented relies on mtimes working correctly. A common use case is to cache built dependencies in Docker, and Docker zeros the nanoseconds from mtime when the image is saved. This caused all packages that had build scripts to get rebuilt when the Docker image runs.

The solution here is to only use the #6720 protection for local (path) packages. This runs under the assumption that mtimes need to work for those anyways.

The consequence is that the scenario in #6720 will no longer work for detecting changes in registry dependencies with build scripts. Fixing that final edge case is nontrivial. Since it is unlikely to happen often, I figure this workaround should be sufficient for now.

cc https://github.com/integer32llc/rust-playground/issues/469
cc https://github.com/rust-lang/rust/issues/59061