Uh oh!
There was an error while loading. Please reload this page.
incr. comp.: Take spans into account for ICH - #36025
Conversation
rust-highfive
commented
Aug 26, 2016
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
TODO: Rename this to CachingCodemapView.
bors
commented
Aug 27, 2016
☔ The latest upstream changes (presumably #36030) made this pull request unmergeable. Please resolve the merge conflicts. |
4dcf193 to
e063f41Comparemichaelwoerister
commented
Aug 29, 2016
This is ready for review now. |
| // 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>, |
There was a problem hiding this comment.
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
commented
Aug 31, 2016
r=me modulo comments about span hashing |
michaelwoerister
commented
Aug 31, 2016
@bors r=nikomatsakis |
bors
commented
Aug 31, 2016
📌 Commit 4549b6b has been approved by |
bors
commented
Sep 1, 2016
☔ The latest upstream changes (presumably #35718) made this pull request unmergeable. Please resolve the merge conflicts. |
4549b6b to
7310a8fComparemichaelwoerister
commented
Sep 1, 2016
@bors r=nikomatsakis rebased. |
bors
commented
Sep 2, 2016
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
michaelwoerister
commented
Sep 2, 2016
@bors retry |
michaelwoerister
commented
Sep 2, 2016
@bors r- Want to take a look at the failed test on travis first... |
michaelwoerister
commented
Sep 2, 2016
@bors retry Couldn't reproduce the test failure. |
michaelwoerister
commented
Sep 2, 2016
@bors r=nikomatsakis |
bors
commented
Sep 2, 2016
📌 Commit 7310a8f has been approved by |
bors
commented
Sep 3, 2016
⌛ Testing commit 7310a8f with merge 3af7da5... |
bors
commented
Sep 3, 2016
💔 Test failed - auto-win-msvc-64-cargotest |
michaelwoerister
commented
Sep 5, 2016
Can reproduce, will investigate... |
nikomatsakis
commented
Sep 6, 2016
r=me on the last commit |
michaelwoerister
commented
Sep 6, 2016
@bors r=nikomatsakis |
bors
commented
Sep 6, 2016
📌 Commit 3057b7b has been approved by |
bors
commented
Sep 6, 2016
⌛ Testing commit 3057b7b with merge 923bac4... |
…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
commented
Sep 6, 2016
This impl skips over a handful of attributes as if they aren't there. This skipping originated all the way back in rust-lang#36025, and was extended a couple of times, e.g. in rust-lang#36370. Those PRs don't have any explanation of why the skipping exists. Removing the impl (and falling back to the default impl for `[T]`) doesn't seem to have any effects.
This impl skips: - All doc comments - A handful of other attributes, mostly `rustc_*` ones related to incremental compilation testing. This skipping originated in rust-lang#36025 and was extended a couple of times, e.g. in rust-lang#36370. Those PRs don't have any explanation of why the skipping exists. Perhaps the reasoning was that doc comments should only affect rustdoc and rustdoc doesn't use incremental compilation? But doc comments end up in metadata, and there is a query `attrs_for_def` that returns a `&'tcx [hir::Attribute]`. So skipping some attributes just seems plainly wrong. This commit removes the impl, which means `[hir::Attribute]` hashing falls back to the default impl for `[T]`. This has no noticeable effect on the test suite. It does slightly hurt performance, because of the doc comments. This perf regression seems worth it for the correcteness benefits.
This impl skips: - All doc comments - A handful of other attributes, mostly `rustc_*` ones related to incremental compilation testing. This skipping originated in rust-lang#36025 and was extended a couple of times, e.g. in rust-lang#36370. Those PRs don't have any explanation of why the skipping exists. Perhaps the reasoning was that doc comments should only affect rustdoc and rustdoc doesn't use incremental compilation? But doc comments end up in metadata, and there is a query `attrs_for_def` that returns a `&'tcx [hir::Attribute]`. So skipping some attributes just seems plainly wrong. This commit removes the impl, which means `[hir::Attribute]` hashing falls back to the default impl for `[T]`. This has no noticeable effect on the test suite. It does slightly hurt performance, because of the doc comments. This perf regression seems worth it for the correctness benefits.
…, r=JonathanBrouwer Remove `HashStable` impl for `[hir::Attribute]`. This impl skips: - All doc comments - A handful of other attributes, mostly `rustc_*` ones related to incremental compilation testing. This skipping originated in #36025 and was extended a couple of times, e.g. in #36370. Those PRs don't have any explanation of why the skipping exists. Perhaps the reasoning was that doc comments should only affect rustdoc and rustdoc doesn't use incremental compilation? But doc comments end up in metadata, and there is a query `attrs_for_def` that returns a `&'tcx [hir::Attribute]`. So skipping some attributes just seems plainly wrong. This commit removes the impl, which means `[hir::Attribute]` hashing falls back to the default impl for `[T]`. This has no noticeable effect on the test suite. It does slightly hurt performance, because of the doc comments. This perf regression seems worth it for the correctness benefits.
…, r=JonathanBrouwer Remove `HashStable` impl for `[hir::Attribute]`. This impl skips: - All doc comments - A handful of other attributes, mostly `rustc_*` ones related to incremental compilation testing. This skipping originated in rust-lang/rust#36025 and was extended a couple of times, e.g. in rust-lang/rust#36370. Those PRs don't have any explanation of why the skipping exists. Perhaps the reasoning was that doc comments should only affect rustdoc and rustdoc doesn't use incremental compilation? But doc comments end up in metadata, and there is a query `attrs_for_def` that returns a `&'tcx [hir::Attribute]`. So skipping some attributes just seems plainly wrong. This commit removes the impl, which means `[hir::Attribute]` hashing falls back to the default impl for `[T]`. This has no noticeable effect on the test suite. It does slightly hurt performance, because of the doc comments. This perf regression seems worth it for the correctness benefits.
…, r=JonathanBrouwer Remove `HashStable` impl for `[hir::Attribute]`. This impl skips: - All doc comments - A handful of other attributes, mostly `rustc_*` ones related to incremental compilation testing. This skipping originated in rust-lang/rust#36025 and was extended a couple of times, e.g. in rust-lang/rust#36370. Those PRs don't have any explanation of why the skipping exists. Perhaps the reasoning was that doc comments should only affect rustdoc and rustdoc doesn't use incremental compilation? But doc comments end up in metadata, and there is a query `attrs_for_def` that returns a `&'tcx [hir::Attribute]`. So skipping some attributes just seems plainly wrong. This commit removes the impl, which means `[hir::Attribute]` hashing falls back to the default impl for `[T]`. This has no noticeable effect on the test suite. It does slightly hurt performance, because of the doc comments. This perf regression seems worth it for the correctness benefits.
…, r=JonathanBrouwer Remove `HashStable` impl for `[hir::Attribute]`. This impl skips: - All doc comments - A handful of other attributes, mostly `rustc_*` ones related to incremental compilation testing. This skipping originated in rust-lang/rust#36025 and was extended a couple of times, e.g. in rust-lang/rust#36370. Those PRs don't have any explanation of why the skipping exists. Perhaps the reasoning was that doc comments should only affect rustdoc and rustdoc doesn't use incremental compilation? But doc comments end up in metadata, and there is a query `attrs_for_def` that returns a `&'tcx [hir::Attribute]`. So skipping some attributes just seems plainly wrong. This commit removes the impl, which means `[hir::Attribute]` hashing falls back to the default impl for `[T]`. This has no noticeable effect on the test suite. It does slightly hurt performance, because of the doc comments. This perf regression seems worth it for the correctness benefits.
…, r=JonathanBrouwer Remove `HashStable` impl for `[hir::Attribute]`. This impl skips: - All doc comments - A handful of other attributes, mostly `rustc_*` ones related to incremental compilation testing. This skipping originated in rust-lang/rust#36025 and was extended a couple of times, e.g. in rust-lang/rust#36370. Those PRs don't have any explanation of why the skipping exists. Perhaps the reasoning was that doc comments should only affect rustdoc and rustdoc doesn't use incremental compilation? But doc comments end up in metadata, and there is a query `attrs_for_def` that returns a `&'tcx [hir::Attribute]`. So skipping some attributes just seems plainly wrong. This commit removes the impl, which means `[hir::Attribute]` hashing falls back to the default impl for `[T]`. This has no noticeable effect on the test suite. It does slightly hurt performance, because of the doc comments. This perf regression seems worth it for the correctness benefits.
…, r=JonathanBrouwer Remove `HashStable` impl for `[hir::Attribute]`. This impl skips: - All doc comments - A handful of other attributes, mostly `rustc_*` ones related to incremental compilation testing. This skipping originated in rust-lang/rust#36025 and was extended a couple of times, e.g. in rust-lang/rust#36370. Those PRs don't have any explanation of why the skipping exists. Perhaps the reasoning was that doc comments should only affect rustdoc and rustdoc doesn't use incremental compilation? But doc comments end up in metadata, and there is a query `attrs_for_def` that returns a `&'tcx [hir::Attribute]`. So skipping some attributes just seems plainly wrong. This commit removes the impl, which means `[hir::Attribute]` hashing falls back to the default impl for `[T]`. This has no noticeable effect on the test suite. It does slightly hurt performance, because of the doc comments. This perf regression seems worth it for the correctness benefits.
…, r=JonathanBrouwer Remove `HashStable` impl for `[hir::Attribute]`. This impl skips: - All doc comments - A handful of other attributes, mostly `rustc_*` ones related to incremental compilation testing. This skipping originated in rust-lang/rust#36025 and was extended a couple of times, e.g. in rust-lang/rust#36370. Those PRs don't have any explanation of why the skipping exists. Perhaps the reasoning was that doc comments should only affect rustdoc and rustdoc doesn't use incremental compilation? But doc comments end up in metadata, and there is a query `attrs_for_def` that returns a `&'tcx [hir::Attribute]`. So skipping some attributes just seems plainly wrong. This commit removes the impl, which means `[hir::Attribute]` hashing falls back to the default impl for `[T]`. This has no noticeable effect on the test suite. It does slightly hurt performance, because of the doc comments. This perf regression seems worth it for the correctness benefits.
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.