Issue Type: Bug
After upgrading to 2020.11 (with the latest Pylance language server) I no longer find any workspace symbols. Downgrading to 2020.10 fixes it for me. No details in the python or pylance output panes.
Extension version: 2020.10.332292344
VS Code version: Code - Insiders 1.52.0-insider (050a123750e4ef4009930d0da1ff7a1a6441d4f3, 2020-11-12T05:43:04.852Z)
OS version: Windows_NT x64 10.0.19042
Remote OS version: Linux x64 5.4.72-gentoo
Remote OS version: Linux x64 5.4.72-gentoo
Remote OS version: Linux x64 5.4.72-gentoo
System Info
|Item|Value|
|---|---|
|CPUs|AMD Ryzen 7 2700X Eight-Core Processor (16 x 3693)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|31.93GB (18.17GB free)|
|Process Argv|--crash-reporter-id c6195c38-5aa8-4897-b60d-c88b99231d15|
|Screen Reader|no|
|VM|0%|
|Item|Value|
|---|---|
|Remote|SSH: eluvian|
|OS|Linux x64 5.4.72-gentoo|
|CPUs|AMD Ryzen 5 3600X 6-Core Processor (12 x 3599)|
|Memory (System)|31.35GB (3.99GB free)|
|VM|0%|
|Item|Value|
|---|---|
|Remote|SSH: eluvian|
|OS|Linux x64 5.4.72-gentoo|
|CPUs|AMD Ryzen 5 3600X 6-Core Processor (12 x 3599)|
|Memory (System)|31.35GB (3.99GB free)|
|VM|0%|
|Item|Value|
|---|---|
|Remote|SSH: eluvian|
|OS|Linux x64 5.4.72-gentoo|
|CPUs|AMD Ryzen 5 3600X 6-Core Processor (12 x 3599)|
|Memory (System)|31.35GB (3.99GB free)|
|VM|0%|
Can confirm this on VSCode 1.51.1 (stable) and I also had to downgrade the official Python extension to 2020.10.332292344 to fix it.
Can you set "python.analysis.indexing": true and reload to see if that fixes your issue?
But, I'm not certain how downgrading the Python extension would be fixing it... We should be finding symbols if any python file is open.
"python.analysis.indexing": true, doesn't change anything, but that setting is also showing up as "Unknown Configuration Setting"...
Yes, it's hidden.
I don't know if Pylance did anything to cause this, if downgrading the extension fixes it... If you use the latest Python extension but use MPLS, do workspace symbols work? Or is it exclusive to Pylance?
Pylance also updated yesterday, so I'd check if downgrading that works, but if you said downgrading the Python extension fixed it then that shouldn't work either.
I'm also having the same issue...python.analysis.indexing did not fix. Downgrading python worked, thanks!
Downgrading Pylance was actually the first thing I tried even before downgrading this extension and it didn't help.
When switching to the Microsoft language server, the download seems to gets stuck at whatever step comes before 100% (not a connection issue, wget works fine), so I can't try that one.
@karthiknadig I'm not entirely certain that this is a Pylance bug, if downgrading us doesn't fix anything, but downgrading the core extension does. No clue what would have changed; doc symbols goes directly from Pylance to the editor via the LSP client.
@ThiefMaster
can you set this in setting.json
"python.trace.server": "verbose",
"python.analysis.logLevel": "Trace",
and share the logs with us? it will show us whether we (Pylance) got request or not.
sure:
@ThiefMaster thank you for the log ThiefMaster!
so it looks like Pylance get the request and respond to it correctly. there seems to be a bug in python extension side. @judej @jakebailey reroute the bug? or should we fix it in python extension repo ourselves?
It would have to be a Python extension bug at this point. I don't know if the client there changed to break the symbols or what; needs some investigation. More reason why we should own the client... 馃檪
Okay, yes, the middleware massively changed at some point. I wasn't aware.
Transferring this back. There's something wrong with the new middleware that is losing workspace symbols.
toIncomingWorkspaceSymbol is undefined for some reason.
rejected promise not handled within 1 second: TypeError: this.toIncomingWorkspaceSymbol is not a function
extensionHostProcess.js:1066
stack trace: TypeError: this.toIncomingWorkspaceSymbol is not a function
at e:\work\vscode-python\out\client\jupyter\languageserver\notebookConverter.js:76:44
at Array.map (<anonymous>)
at NotebookMiddlewareAddon.toIncomingWorkspaceSymbols (e:\work\vscode-python\out\client\jupyter\languageserver\notebookConverter.js:76:28)
@rchiodo Can you help here? https://github.com/microsoft/vscode-python/pull/14522 could be relevant.
Okay, it's a this problem.

Just a silly typo:
if (isThenable(result)) {
return result.then(this.converter.toIncomingWorkspaceSymbols.bind(this));
}
return this.converter.toIncomingWorkspaceSymbols(result);
bind is awful, the arrow syntax is much safer :)
Sending a PR shortly.

Sent #14728. I can submit a cherry pick back to 2020.11 when it's merged.
Most helpful comment
Sending a PR shortly.