-
Notifications
You must be signed in to change notification settings - Fork 304
Large completion lists (e.g. typing "Se") break language services in VS Code on Windows #752
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
Large completion lists (e.g. typing "Se") break language services in VS Code on Windows #752
Comments
(I'm investigating this issue, filing here for visibility in case someone has a hunch) |
Tracked in Apple’s issue tracker as rdar://110399252 |
It might have to do with
|
Could you check if |
@ahoppen This is most likely a Windows-only bug in the |
Oh, that’s… bad. Unfortunately I can’t help with that 😢 |
Just so you know I cannot repro on macOS |
@adam-fowler thanks, that helps confirm the diagnostic. I think fix won't be in this repo so if it's better to close this issue, I'm ok with that. Otherwise I'll close it once I fix the underlying problem. |
After some completion requests, language services stop responding (can't ctrl+click, hover says "Loading..." forever, no more completion, etc). This makes SourceKit-LSP hardly usable and seems like a recent-ish regression (~3 weeks?)
Repro
foo
, its description pops upS
, type7
foo
, its description still pops up7
and typee
foo
, seeLoading...
foreverExpected
Language services continue working.
Environment
Swift:
VSCode:
Swift extension:
Investigation
I locally rebuilt SourceKit-LSP with only support for
textDocument/completion
andtextDocument/hover
and can repro this (except that I don't get squiggles, expectedly). However I cannot repro it after disablingtextDocument/completion
.Curiously, SourceKit-LSP keeps logging valid request/response pairs, but it seems like VSCode never processes them.
The only difference in LSP logging between the
S7
andSe
cases are:Se
results in a massive completion response (173 items), whereasS7
has an empty response$/cancelRequest
s after the completion of the hover request in theS7
case:When artificially trimming down the completion response to 50 items in SourceKit-LSP, the issue disappears, even if adding a sleep, so this has to do with the payload size of large completion lists. I dumped the JSON and it is well-formatted to this is not the issue.
Testing different completions and monitoring the size of the resulting json response, it seems like something funny happens around 0xFFFF:
The text was updated successfully, but these errors were encountered: