Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

incr. comp.: Take spans into account for ICH #36025

Merged
merged 14 commits into from
Sep 6, 2016

Conversation

michaelwoerister
Copy link
Member

@michaelwoerister michaelwoerister commented Aug 26, 2016

This PR makes the ICH (incr. comp. hash) take spans into account when debuginfo is enabled.

A side-effect of this is that the SVH (which is based on the ICHs of all items in the crate) becomes sensitive to the tiniest change in a code base if debuginfo is enabled. Since we are not trying to model ABI compatibility via the SVH anymore (this is done via the crate disambiguator now), this should be not be a problem.

Fixes #33888.
Fixes #32753.

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

eviction_index: usize,
}

impl<'tcx> CachedCodemapView<'tcx> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Rename this to CachingCodemapView.

@bors
Copy link
Contributor

bors commented Aug 27, 2016

☔ The latest upstream changes (presumably #36030) made this pull request unmergeable. Please resolve the merge conflicts.

@michaelwoerister michaelwoerister changed the title WIP: Take spans into account for ICH incr. comp.: Take spans into account for ICH Aug 29, 2016
@michaelwoerister
Copy link
Member Author

This is ready for review now.

pub struct StrictVersionHashVisitor<'a, 'hash: 'a, 'tcx: 'hash> {
pub tcx: TyCtxt<'hash, 'tcx, 'tcx>,
pub st: &'a mut SipHasher,
// collect a deterministic hash of def-ids that we have seen
def_path_hashes: &'a mut DefPathHashes<'hash, 'tcx>,
hash_spans: bool,
codemap: CachedCodemapView<'tcx>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think it would be better if this lived one level up, next to the DefPathHashes, so that we can cache across items.

@nikomatsakis
Copy link
Contributor

r=me modulo comments about span hashing

@michaelwoerister
Copy link
Member Author

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Aug 31, 2016

📌 Commit 4549b6b has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Sep 1, 2016

☔ The latest upstream changes (presumably #35718) made this pull request unmergeable. Please resolve the merge conflicts.

@michaelwoerister
Copy link
Member Author

@bors r=nikomatsakis

rebased.

@bors
Copy link
Contributor

bors commented Sep 1, 2016

📌 Commit 7310a8f has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Sep 2, 2016

⌛ Testing commit 7310a8f with merge 4c70c01...

@bors
Copy link
Contributor

bors commented Sep 2, 2016

💔 Test failed - auto-win-gnu-32-opt-rustbuild

@michaelwoerister
Copy link
Member Author

@bors retry

@michaelwoerister
Copy link
Member Author

@bors r-

Want to take a look at the failed test on travis first...

@michaelwoerister
Copy link
Member Author

@bors retry

Couldn't reproduce the test failure.

@michaelwoerister
Copy link
Member Author

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Sep 2, 2016

📌 Commit 7310a8f has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Sep 3, 2016

⌛ Testing commit 7310a8f with merge 3af7da5...

@bors
Copy link
Contributor

bors commented Sep 3, 2016

💔 Test failed - auto-win-msvc-64-cargotest

@michaelwoerister
Copy link
Member Author

Can reproduce, will investigate...

@nikomatsakis
Copy link
Contributor

r=me on the last commit

@michaelwoerister
Copy link
Member Author

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Sep 6, 2016

📌 Commit 3057b7b has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Sep 6, 2016

⌛ Testing commit 3057b7b with merge 923bac4...

bors added a commit that referenced this pull request Sep 6, 2016
…atsakis

incr. comp.: Take spans into account for ICH

This PR makes the ICH (incr. comp. hash) take spans into account when debuginfo is enabled.

A side-effect of this is that the SVH (which is based on the ICHs of all items in the crate) becomes sensitive to the tiniest change in a code base if debuginfo is enabled. Since we are not trying to model ABI compatibility via the SVH anymore (this is done via the crate disambiguator now), this should be not be a problem.

Fixes #33888.
Fixes #32753.
@bors bors merged commit 3057b7b into rust-lang:master Sep 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants