-
Notifications
You must be signed in to change notification settings - Fork 767
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
Breaks open symbol by name #124
Comments
If you enable trace logging (see https://github.com/microsoft/pylance-release/blob/master/TROUBLESHOOTING.md#filing-an-issue), do you see that Pylance is parsing and binding files while the search is pending? |
Yes and it eventually throws an error:
|
Thanks for the logs. One thing that immediately jumps out at me is the fact that Pyright is attempting to parse and bind ".so" files. It obviously shouldn't be doing that. That's an easy fix, but it's not clear that's the real problem here. Another potential problem is the UnhandledPromiseRejectionWarning. I would expect the vscode-languageserver library to be handling this, since it accepts the promise for the "find symbols" request, and it handles cancellation exceptions. Or am I making a bad assumption there, @jakebailey? |
I think there's some oddity happening with |
But I'd agree that the perf problem is more likely to be impacted by the reading of non Python files than anything. That exception (from my experience) happens at the very end because VS Code has given up on receiving an answer, hence why it's a cancellation. |
they might have wrong filespec that include *.so? |
I've introduced a fix in Pyright to not include native libraries in the list of tracked source files, so they will no longer be parsed. |
I'm thinking this is fixed, but wasn't marked as such. Let us know if that's not the case. #34 is the general tracking issue for this workspace symbol system being slow (and that's being worked on). |
@jakebailey Yes, working now. Thanks for the update. |
@jakebailey While it's working, it's extremely slow. Even in a relatively small workspace, looking up a symbol takes several seconds. |
It's slow because it's looking in all imported libraries for the symbol. After additional discussion, we've decided this is not the correct behavior, so I've changed the code to look only in user files in the workspace. It's now much faster (almost instantaneous for small workspaces). This change will be included in the next release of Pylance. We're also working on a lightweight indexer that will make this feature even faster, but this work isn't yet complete. |
Ah, there was a misunderstanding then. I had thought the fix was already out. |
Environment data
Opening symbols by name (cmd + T) stopped working in my workspace after installing Pylance. VS Code no longer finds anything, instead displaying the spinner below the search field indefinitely.
The text was updated successfully, but these errors were encountered: