Uh oh!
There was an error while loading. Please reload this page.
remove intercrate ambiguity hints - #47738
Conversation
nikomatsakis
commented
Jan 25, 2018
er, oops -- let me add a test! |
nikomatsakis
commented
Jan 25, 2018
I actually have to figure out how to formulate one. The test I have which reproduces diesel's problem isn't, I think, affected by this change. |
nikomatsakis
commented
Jan 25, 2018
(Also, the problem was sort of order dependent, but I might be able to fix that.) |
eddyb
commented
Jan 25, 2018
r=me |
nikomatsakis
commented
Jan 25, 2018
ok, added a test that fails on beta/nightly and which I believe is representative of the diesel error |
nikomatsakis
commented
Jan 25, 2018
@bors r+ p=1 -- important to get diesel up and going again |
bors
commented
Jan 25, 2018
📌 Commit cb4aa5f has been approved by |
qnighy
commented
Jan 25, 2018
@nikomatsakis oh bad 😞 Anyway I'm interested in both refactoring trait selection and reintroducing the hints. It may take time for me to remember things around trait selection though... |
qnighy
commented
Jan 25, 2018
For reference: the PR that introduced the hints is #43426 |
nikomatsakis
commented
Jan 25, 2018
@bors r- // travis failures, will investigate |
I can't say I like this fix - this regresses from beta because it removes the coherence problem detection feature. Maybe we should just disable intercrate ambiguity hints "initially", and then call trait selection again with them enabled only if there was a coherence error. That's it, add a That way the error detection code will not be called unless there is an actual coherence error, in which case we don't care as much if there is an overflow. |
nikomatsakis
commented
Jan 26, 2018
It is a brute force fix, that's true. Doing it in two passes is a decent idea. |
I'll review with the two-pass thing |
nikomatsakis
commented
Jan 26, 2018
I did the two-pass change but for .. some reason I do not know I am not getting the full range of hints yet. I'll debug in a bit, but pushing intermediate status. |
4f6f7d4 to
915014cComparearielb1
commented
Jan 27, 2018
A squash would be nice. |
The missing errors might be caused by the infcx The reason this worked before is because intercrate mode only uses the per-infcx evaluation cache: rust/src/librustc/traits/select.rs Lines 1249 to 1277 in 6b99ade And coherence uses a fresh inference context for each overlap check, starting with an empty evaluation cache: To fix this, I think the best way would be to create a fresh inference context for the "error reporting" check. |
2035f63 to
25c5899Comparenikomatsakis
commented
Jan 29, 2018
@arielb1 ok, cleaned up, take a look -- running full tests now but seems to work |
25c5899 to
dce6473Comparebors
commented
Jan 31, 2018
⌛ Testing commit 2fc5739 with merge fb4d05e0e9c83a68626168b86e0fd26fc3aa736d... |
bors
commented
Jan 31, 2018
💔 Test failed - status-appveyor |
kennytm
commented
Jan 31, 2018
bors
commented
Jan 31, 2018
⌛ Testing commit 2fc5739 with merge 20d027e9d7d9d50f1eb257fa38c4a2b7dd0cd4ee... |
bors
commented
Jan 31, 2018
💔 Test failed - status-appveyor |
kennytm
commented
Jan 31, 2018
sgrif
commented
Jan 31, 2018
I can confirm that this PR fixes Diesel's build |
sgrif
commented
Jan 31, 2018
It doesn't look like bors recognized the retry request |
Mark-Simulacrum
commented
Jan 31, 2018
bors
commented
Jan 31, 2018
⌛ Testing commit 2fc5739 with merge 60e2baaa825fc13e1d1f764e32348ee6af7d3314... |
bors
commented
Jan 31, 2018
💔 Test failed - status-travis |
nikomatsakis
commented
Feb 1, 2018
https://travis-ci.org/rust-lang/rust/jobs/335887927#L1 ... spurious? |
kennytm
commented
Feb 1, 2018
@bors retry |
bors
commented
Feb 1, 2018
remove intercrate ambiguity hints The scheme was causing overflows during coherence checking (e.g. #47139). This is sort of a temporary fix; the proper fix I think involves reworking trait selection in deeper ways. cc @sgrif -- this *should* fix diesel cc @qnighy -- I'd like to discuss you with alternative techniques for achieving the same end. =) Actually, it might be good to put some energy into refactoring traits first. r? @eddyb
bors
commented
Feb 1, 2018
☀️ Test successful - status-appveyor, status-travis |
Backport 47738 to beta Backport of #47738 to beta branch.
The scheme was causing overflows during coherence checking (e.g. #47139). This is sort of a temporary fix; the proper fix I think involves reworking trait selection in deeper ways.
cc @sgrif -- this should fix diesel
cc @qnighy -- I'd like to discuss you with alternative techniques for achieving the same end. =) Actually, it might be good to put some energy into refactoring traits first.
r? @eddyb