Uh oh!
There was an error while loading. Please reload this page.
Checker:: Execute levenshtein before other context checking - #39291
Conversation
rust-highfive
commented
Jan 25, 2017
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @arielb1 (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
nagisa
commented
Jan 25, 2017
Needs a test at the very least. |
nagisa
commented
Jan 25, 2017
Question: does the other suggestion fire at all anymore? e.g. I would expect rustc to report both hints in case of say: |
Freyskeyd
commented
Jan 25, 2017
Mmh i don't think it will check for both hints. I will check if i can do it. |
petrochenkov
commented
Jan 25, 2017
r- from me |
petrochenkov
commented
Jan 25, 2017
Showing all applicable labels is an alternative too, but I'd like to see first how the result looks visually. |
mrhota
commented
Feb 23, 2017
@Freyskeyd ping. what's the story here? |
Freyskeyd
commented
Feb 24, 2017
hi @mrhota, I didn't work on it for a while (no time for the moment). I can close this PR if it's a problem. |
@bors r=nrc You are more familiar with this code. |
bors
commented
Mar 7, 2017
📌 Commit 3d38dbd has been approved by |
bors
commented
Mar 7, 2017
💡 This pull request was already approved, no need to approve it again.
|
bors
commented
Mar 7, 2017
📌 Commit 3d38dbd has been approved by |
bors
commented
Mar 9, 2017
🔒 Merge conflict |
a4b67d3 to
eece90fComparebors
commented
Mar 12, 2017
☔ The latest upstream changes (presumably #40455) made this pull request unmergeable. Please resolve the merge conflicts. |
46d4f1a to
dc56bb1Comparealexcrichton
commented
Apr 1, 2017
@Freyskeyd gah sorry for the delay here! It looks like there's some errors on Travis though that would prevent this from landing? |
leoyvens
commented
Apr 10, 2017
Is this supposed to be approved? I think @arielb1 meant to r? nrc rather than r=nrc |
arielb1
commented
Apr 13, 2017
r? @nrc |
carols10cents
commented
Apr 17, 2017
Yeah, looks like there are some test failures: https://travis-ci.org/rust-lang/rust/jobs/210479172#L4366 Let us know if you need any help @Freyskeyd! |
Freyskeyd
commented
Apr 18, 2017
@carols10cents I will make an update this week. I will let you know if I need some help :) thank's! |
0f3dbd7 to
c487396Compare
Freyskeyd
left a comment
There was a problem hiding this comment.
Can I have your opinion on the reference modification please? cc @carols10cents
There was a problem hiding this comment.
It's unrevelante here. Right?
There was a problem hiding this comment.
Are you asking if it's ok that your code change changes these suggestions? I'm not sure :-/ since nrc is on paternity leave right now... @jonathandturner are you the next best person to help out around error message suggestions?
There was a problem hiding this comment.
yes, I'm asking if it's ok to update that part of suggestion or not. We keep both suggest but is it valid to tell user that, maybe, he misstyped it?
There was a problem hiding this comment.
It's ok, but Levenshtein suggestions should probably be turned off globally for single-letter identifiers (not necessarily in this PR).
There was a problem hiding this comment.
Fall-back labels should not be reported if any other labels are reported.
There was a problem hiding this comment.
Hi @petrochenkov, could you clarify a bit on how @Freyskeyd would fix this so that fall-back labels aren't reported?
There was a problem hiding this comment.
Could you also remove this return instead of commenting it out?
There was a problem hiding this comment.
@petrochenkov Yep, I just let it here to validate behavior with you.
arielb1
commented
Apr 25, 2017
ping @petrochenkov & @Freyskeyd - making sure this PR doesn't disappear. |
Freyskeyd
commented
Apr 25, 2017
@arielb1 I'm working on it^^ |
c487396 to
75b550dCompare76e3faa to
5379203CompareThere was a problem hiding this comment.
@Freyskeyd
IIRC, span_labels().is_empty() had quirks and didn't work as expected.
From the tests it looks like it still doesn't work.
You can just set some boolean flag if Levenshtein worked and check it here.
petrochenkov
commented
Apr 28, 2017
@Freyskeyd |
Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>
5379203 to
0d7e6cfCompareFreyskeyd
commented
Apr 28, 2017
ping @petrochenkov@carols10cents :) |
petrochenkov
commented
Apr 29, 2017
@bors r+ |
bors
commented
Apr 29, 2017
📌 Commit 0d7e6cf has been approved by |
bors
commented
Apr 29, 2017
Checker:: Execute levenshtein before other context checking
As explain [here]() i think it's better to check for a miss typing before checking context dependent help.
```rust
struct Handle {}
struct Something {
handle: Handle
}
fn main() {
let handle: Handle = Handle {};
let s: Something = Something {
// Checker detect an error and propose a solution with `Handle { /* ... */ }`
// but it's a miss typing of `handle`
handle: Handle
};
}
```
Ping: @nagisa for #39226
Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>bors
commented
Apr 29, 2017
☀️ Test successful - status-appveyor, status-travis |
As explain here i think it's better to check for a miss typing before checking context dependent help.
Ping: @nagisa for #39226
Signed-off-by: Freyskeyd simon.paitrault@gmail.com