Uh oh!
There was an error while loading. Please reload this page.
Record proc macro harness order for use during metadata deserialization - #68814
Conversation
rust-highfive
commented
Feb 3, 2020
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
commented
Feb 4, 2020
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
591a367 to
5eb06a0Comparepetrochenkov
commented
Feb 4, 2020
r? @petrochenkov |
There's probably some way to fix the ordering mismatch, but I really don't think it's the right approach. We shouldn't have to care about the precise order in which we generate the harness - we've already been wrong twice. Explicitly defining the order ensures that we'll never have to worry about this again. If we try to patch the visitation orders to match, I'm almost certain that we'll hit this kind of issue again. We might miss another weird corner case, or someone could change the AST/HIR such that the itertion order is different. |
petrochenkov
commented
Feb 9, 2020
(This will probably has to wait until the next weekend.) |
See #68814 (comment). |
Uh oh!
There was an error while loading. Please reload this page.
petrochenkov
commented
Feb 15, 2020
r=me with comments added to AST as well. |
Fixesrust-lang#68690 When we generate the proc macro harness, we now explicitly recorder the order in which we generate entries. We then use this ordering data to deserialize the correct proc-macro-data from the crate metadata.
5eb06a0 to
5164598CompareAaron1011
commented
Feb 15, 2020
@petrochenkov: I've added an additional comment. |
petrochenkov
commented
Feb 15, 2020
@bors r+ |
bors
commented
Feb 15, 2020
📌 Commit 5164598 has been approved by |
Mark-Simulacrum
commented
Feb 15, 2020
@bors rollup=never |
bors
commented
Feb 16, 2020
…nkov Record proc macro harness order for use during metadata deserialization Fixes#68690 When we generate the proc macro harness, we now explicitly recorder the order in which we generate entries. We then use this ordering data to deserialize the correct proc-macro-data from the crate metadata.
bors
commented
Feb 16, 2020
☀️ Test successful - checks-azure |
petrochenkov
commented
Feb 16, 2020
I won't revert this PR since it had already landed, but the error was actually in the encoder. tcx.hir().krate().items
=>
tcx.hir().krate().module.item_idsItem order in HIR does repeat the item order in AST, |
Fixes#68690
When we generate the proc macro harness, we now explicitly recorder the
order in which we generate entries. We then use this ordering data to
deserialize the correct proc-macro-data from the crate metadata.