Skip to content

Commit

Permalink
Auto merge of #45867 - michaelwoerister:check-ich-stability, r=nikoma…
Browse files Browse the repository at this point in the history
…tsakis

incr.comp.: Verify stability of incr. comp. hashes and clean up various other things.

The main contribution of this PR is that it adds the `-Z incremental-verify-ich` functionality. Normally, when the red-green tracking system determines that a certain query result has not changed, it does not re-compute the incr. comp. hash (ICH) for that query result because that hash is already known. `-Z incremental-verify-ich` tells the compiler to re-hash the query result and compare the new hash against the cached hash. This is a rather thorough way of
- testing hashing implementation stability,
- finding missing `[input]` annotations on `DepNodes`, and
- finding missing read-edges,

since both a missed read and a missing `[input]` annotation can lead to something being marked as green instead of red and thus will have a different hash than it should have.

Case in point, implementing this verification logic and activating it for all `src/test/incremental` tests has revealed several such oversights, all of which are fixed in this PR.

r? @nikomatsakis
  • Loading branch information
bors committed Nov 8, 2017
2 parents 34c0a5e + 40a81d9 commit 57037f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,7 @@ actual:\n\

if let Some(ref incremental_dir) = self.props.incremental_dir {
rustc.args(&["-Z", &format!("incremental={}", incremental_dir.display())]);
rustc.args(&["-Z", "incremental-verify-ich"]);
}

match self.config.mode {
Expand Down

0 comments on commit 57037f3

Please sign in to comment.