]> git.proxmox.com Git - cargo.git/commit
Auto merge of #2279 - alexcrichton:rerun-if-changed-rust-file, r=brson
authorbors <bors@rust-lang.org>
Fri, 15 Jan 2016 00:40:34 +0000 (00:40 +0000)
committerbors <bors@rust-lang.org>
Fri, 15 Jan 2016 00:40:34 +0000 (00:40 +0000)
commit2c1426e1ff7d8d90f760d0e560f67663a91904b7
treedd0f6ff26f0218ded2a8e76c792dded88555c24c
parent2257fce3f0adbfc1ba5b5c312638de808a7f616e
parent7dcedd85a4c7d8bef6287d52fec204abb5573634
Auto merge of #2279 - alexcrichton:rerun-if-changed-rust-file, r=brson

There was a failure mode of the handling of the rerun-if-changed directive where
it would rerun the build script twice before hitting a steady state of actually
processing the directives. The order of events that led to this were:

1. A project was built from a clean directory. Cargo recorded a fingerprint
   indicating this (for the build script), but the fingerprint indicated that
   the build script was a normal build script (no manually specified inputs)
   because Cargo had no prior knowledge.
2. A project was then rebuilt from the same directory. Cargo's new fingerprint
   for the build script now indicates that there is a custom list of
   dependencies, but the previous fingerprint indicates there wasn't, so the
   mismatch causes another rebuild.
3. All future rebuilds will agree that there are custom lists both before and
   after, so the directives are processed as one would expect.

This commit does a bit of refactoring in the fingerprint module to fix this
situation. The recorded fingerprint in step (1) is now recorded as a "custom
dependencies are specified" fingerprint if, after the build script is run,
custom dependencies were specified.

Closes #2267