Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 15 commits into from
Nov 9, 2017

Conversation

michaelwoerister
Copy link
Member

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

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 8, 2017
@nikomatsakis nikomatsakis self-assigned this Nov 8, 2017
@nikomatsakis
Copy link
Contributor

@bors r+ p=1

Giving high priority because this is a big ticket item and I want @michaelwoerister unblocked.

@bors
Copy link
Collaborator

bors commented Nov 8, 2017

📌 Commit d01b89b has been approved by nikomatsakis

@bors
Copy link
Collaborator

bors commented Nov 8, 2017

⌛ Testing commit d01b89b with merge da3fbe7...

bors added a commit that referenced this pull request Nov 8, 2017
…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
@bors
Copy link
Collaborator

bors commented Nov 9, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing da3fbe7 to master...

@bors bors merged commit d01b89b into rust-lang:master Nov 9, 2017
bors added a commit that referenced this pull request Nov 14, 2017
…en, r=alexcrichton

incr.comp.: Don't crash in DepGraph::try_mark_green() when encountering a removed input node.

Fixes a small regression that was introduced in #45867.

r? @nikomatsakis
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants