-
Notifications
You must be signed in to change notification settings - Fork 768
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
Outline view only filled after typing #1823
Comments
This is related to #1424. I suspect it's due to an interaction between the Python extension and Pylance. If the initial outline request arrives before the Python extension is fully initialized, the request is not forwarded to Pylance. That's just a theory based on the symptoms. |
How annoying; I really thought this race had long since been fixed. Overall, this whole thing is confusing. What makes the outline different than something like semantic tokens, which is also sent when a file is opened or the LS starts? @mrx23dot If you can reproduce this easily, would you mind gathering an LSP trace doing the steps you described? You can enable LSP tracing by setting the (undocumented) setting |
Sure, before line 4660 is the startup, then I start typing. It's reproducible with a clean install, without any settings. Everything should be latest version. |
The outline information comes from the LSP request 'textDocument/documentSymbol'. You can see this was requested at line 6872 and was returned at line 6880 in the log. It is not requested prior to that. This request should have been received just after the document was opened (line 722). |
Thanks for the logs; I can definitely see that there's no documentSymbol before the first didChange. This to me smells like a client bug; surely VS Code should be sending the request after it opens the document. We don't even get one. (And we are also very happy to handle documentSymbol on unopened documents too; it's just that VS Code didn't even send the request...) |
When I investigated this earlier, I was never able to get this to repro with pyright, but I was able to repro it with pylance + the Python extension. So I suspect it's a race condition somewhere. My guess is that it's in the Python extension, but it's possible that it's in VS Code itself, and the longer startup time of the Python extension triggers the race condition. |
If we are sure that pylance displays every signal from VS without filtering that would mean VS didn't emit the signal. |
@mrx23dot I can't repro this with the latest pylance. please reopen if it still repro. |
Issue Type: Bug
Outline view works before installing Pylance.
I install Pylance
python.languageServer is set from Jedi to Pylance
Then Outline view is only populated when I start typing.
My guess is that the parsing engine is not started till I start typing.
Extension version: 2021.9.1
VS Code version: Code 1.60.1 (83bd43bc519d15e50c4272c6cf5c1479df196a4d, 2021-09-10T17:07:10.714Z)
OS version: Windows_NT x64 10.0.18363
Restricted Mode: No
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: