fix(query): Pass Query Key to value_from_cycle_error#153694
fix(query): Pass Query Key to value_from_cycle_error#153694TKanX wants to merge 2 commits intorust-lang:mainfrom
value_from_cycle_error#153694Conversation
|
Failed to set assignee to
|
This comment has been minimized.
This comment has been minimized.
c1f26e9 to
6118290
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This needs a rebase, sorry for an inconvenience. You are a half way there, but you would need to remove |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
6118290 to
5986684
Compare
This comment has been minimized.
This comment has been minimized.
|
FYI: #153707 is also changing this code, replacing the |
|
I had done some recruitment into query system. I thought it was clear from #153493 (comment) |
|
This PR also fixes #142064 as we no longer rely on a reported query cycle and whatever permutation it has, which was the source of that problem. |
|
LGTM |
|
@bors ready If only I could've |
|
Unknown command "ready". Run |
|
This would need a small rebase after #153639 merges. |
This comment has been minimized.
This comment has been minimized.
|
It's a challenging time to start working on the query system, BTW. There is a lot of work going on, by multiple people. Lots of PRs happening, and conflicts needing to be fixed. Hopefully you can work things out! |
|
@rustbot author |
Co-authored-by: Daria Sukhonina <dariasukhonina@gmail.com>
5986684 to
d75b836
Compare
|
There was a problem hiding this comment.
The first commit seems fine, just a couple of nits to fix below.
I'm less certain about the test because I don't know much about the state of parallel tests. I hope there won't be any problems with non-determinism? I will defer to @zetanumbers on that.
I'm happy to let this merge before #153707 because this is smaller and fixing the conflicts will probably be easier for me.
|
|
||
| vtables.check_representability.value_from_cycle_error = | ||
| |tcx, cycle, guar| check_representability(tcx, cycle, guar); | ||
| |tcx, _key, cycle, guar| check_representability(tcx, cycle, guar); |
There was a problem hiding this comment.
The cases above use _ to ignore the key and other arguments. Do the same here for consistency.
| is_loadable_from_disk_fn: |_tcx, _key, _index| false, | ||
|
|
||
| value_from_cycle_error: |tcx, cycle, _| { | ||
| value_from_cycle_error: |tcx, _key, cycle, _| { |
Summary:
Pass the query key directly to
value_from_cycle_errorso thatFromCycleErrorimpls (notablyFnSig) can use the recovered query'sDefIdinstead of relying oncycle[0], which is arbitrarily rotated by the parallel deadlock handler.As suggested in #153644 (comment).
Closes #153391
r? @nnethercote
cc @zetanumbers