-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[READY] Fixes for multi-byte errors #2108
Conversation
RFC because i still need to write some tests ! |
Thanks! Looks good, but like you said, needs tests. Review status: 0 of 4 files reviewed at latest revision, 1 unresolved discussion. python/ycm/omni_completer.py, line 93 [r2] (raw file): Comments from Reviewable |
I am fairly sure there are other places where we need to convert between unicode and bytes (see PR #2090). We'll need also to manage the case where Vim encoding is not Reviewed 3 of 4 files at r1, 1 of 1 files at r2. python/ycm/omni_completer.py, line 99 [r2] (raw file): python/ycm/youcompleteme.py, line 380 [r2] (raw file): Comments from Reviewable |
Review status: all files reviewed at latest revision, 3 unresolved discussions. python/ycm/omni_completer.py, line 99 [r2] (raw file): Comments from Reviewable |
There almost certainly are other places. Like I said in the PR description this is not a thorough review and test of YCM, just what I came across while testing ycmd. Indeed I really only posted it in the hope that folk seeing common issues could take advantage and/or add more testing :) The vim encoding thing is probably going to be painful. I risked Review status: all files reviewed at latest revision, 3 unresolved discussions. python/ycm/omni_completer.py, line 93 [r2] (raw file): python/ycm/omni_completer.py, line 99 [r2] (raw file): I need to write a bunch of tests for this area, because it is actually quite fiddly. python/ycm/youcompleteme.py, line 380 [r2] (raw file): Comments from Reviewable |
I'm far less worried about correct unicode support for people using Vim with non-unicode encodings. They already probably only use ASCII. If they want a unicode-aware Vim setup, they should use some unicode encoding. I do not expect this PR to fix all the unicode issues, just plenty of them. "Perfect is the enemy of good" and all that. Let's improve matters considerably with this PR and take it from there. Review status: all files reviewed at latest revision, 3 unresolved discussions. Comments from Reviewable |
Review status: all files reviewed at latest revision, 2 unresolved discussions. python/ycm/omni_completer.py, line 99 [r2] (raw file): Comments from Reviewable |
667f3d4
to
8200289
Compare
I think this is ready now, it just needs the ycmd PR merged first |
Reviewed 1 of 4 files at r1, 9 of 10 files at r3, 3 of 3 files at r4. .gitmodules, line 6 [r4] (raw file): Comments from Reviewable |
Review status: all files reviewed at latest revision, 2 unresolved discussions. .gitmodules, line 6 [r4] (raw file): python/ycm/omni_completer.py, line 99 [r2] (raw file): Comments from Reviewable |
Is this updated for the ycmd merge of the unicode PR? Other than that, this is . Reviewed 1 of 4 files at r1, 9 of 10 files at r3, 3 of 3 files at r4. Comments from Reviewable |
Yeah I have now updated this PR to the latest upstream ycmd after the other PR is merged. |
I made some comments but this looks fine. Reviewed 9 of 10 files at r3, 3 of 3 files at r4, 2 of 2 files at r5. run_tests.py, line 78 [r5] (raw file): python/ycm/omni_completer.py, line 108 [r5] (raw file): python/ycm/test_utils.py, line 60 [r4] (raw file): python/ycm/test_utils.py, line 145 [r4] (raw file): python/ycm/test_utils.py, line 153 [r4] (raw file): python/ycm/tests/omni_completer_test.py, line 508 [r4] (raw file): python/ycm/tests/omni_completer_test.py, line 688 [r4] (raw file): python/ycm/tests/omni_completer_test.py, line 747 [r4] (raw file): python/ycm/tests/omni_completer_test.py, line 607 [r5] (raw file): python/ycm/tests/postcomplete_tests.py, line 31 [r4] (raw file): Comments from Reviewable |
☔ The latest upstream changes (presumably #2140) made this pull request unmergeable. Please resolve the merge conflicts. |
- Correct FixIts when there are unicode characters - Fix errors in CompleteDone handler - Fix tracebacks when omnifunc returns unicode chars
a10a049
to
3e3e9bf
Compare
Review status: 8 of 10 files reviewed at latest revision, 11 unresolved discussions. run_tests.py, line 78 [r5] (raw file):
|
|
Good to go? Seems like it. Thanks for the PR! @homu r=valloric
|
📌 Commit e734261 has been approved by |
⚡ Test exempted - status |
[READY] Fixes for multi-byte errors # PR Prelude Thank you for working on YCM! :) **Please complete these steps and check these boxes (by putting an `x` inside the brackets) _before_ filing your PR:** - [X] I have read and understood YCM's [CONTRIBUTING][cont] document. - [X] I have read and understood YCM's [CODE_OF_CONDUCT][code] document. - [X] I have included tests for the changes in my PR. If not, I have included a rationale for why I haven't. - [X] **I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.** # Why this change is necessary and useful There are a number of recent errors with unicode (most of which caused by the server, see PR ycm-core/ycmd#455. In testing I fixed a number of client-side tracebacks also. This is by no means a comprehensive set of fixes for the client - I have simply fixed those that I came across in testing. Summary: - fixes for errors when typing in c-sharp files due to the completion done handler - fixes for FixIts to apply correctly with multi-byte characters - fixes for unicode characters in return from the omni completer [cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md [code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2108) <!-- Reviewable:end -->
PR Prelude
Thank you for working on YCM! :)
Please complete these steps and check these boxes (by putting an
x
insidethe brackets) before filing your PR:
rationale for why I haven't.
actually perform all of these steps.
Why this change is necessary and useful
There are a number of recent errors with unicode (most of which caused by the server, see PR ycm-core/ycmd#455. In testing I fixed a number of client-side tracebacks also.
This is by no means a comprehensive set of fixes for the client - I have simply fixed those that I came across in testing.
Summary:
This change is