You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Go to Symbol in Workspace... breaks if custom file system provider folders exist in workspace #4107
Extension version (available under the Extensions sidebar): 2018.12.1
OS and version: Windows 10
Python version (& distribution if applicable, e.g. Anaconda): 3.6.8, Anaconda
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Relevant/affected Python packages and their versions: N/A
Expected behaviour
When using Go To Symbol in Workspace... I should get a list populated with symbols in the workspace, at least for the directories which are not virtual.
Actual behaviour
An error is thrown when trying to process virtual directories, resulting in the popup prompting the user to install ctags (even though it is installed) being fired.
Steps to reproduce:
Use some method to add a virtual directory to your workspace. I used GitLens and "Explore Repository from Here" on a branch, which gives be a virtual directory representing the repository's state in that branch.
Try "Go to Symbol in Workspace..."
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
I fixed this locally, so I can't post logs without undoing my fix which is cumbersome.
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)
Ditto.
Fix
To fix this issue locally, I edited the extension.js file replacing get enabled(){return this.pythonSettings.workspaceSymbols.enabled}
with get enabled(){return this.pythonSettings.workspaceSymbols.enabled&&this.workspaceFolder.scheme === "file"}
Refer to this line of the actual TypeScript source of the extension for where I placed the check, essentially disabling generators if the related folder does not have the file scheme for the uri. This might not be the best approach, but it was easiest to hack into extension.js.
The idea of the approach should work though, don't try to generate symbols for virtual directories.
We are going through old issues and we noticed that no one from the team had replied to this issue. I want to apologize for the oversight and to let you know that the issue was reviewed by the team and triaged (as shown by the labels applied to this issue).
Activity
brettcannon commentedon Jul 24, 2020
We are going through old issues and we noticed that no one from the team had replied to this issue. I want to apologize for the oversight and to let you know that the issue was reviewed by the team and triaged (as shown by the labels applied to this issue).
luabud commentedon Apr 27, 2021
Closing in favour of #16063.