Hang on source file search when opening $HOME #2710
Replies: 10 comments
-
@abartlett004 We'd appreciate if you could fill out the info requested here: https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#filing-an-issue (Or, file a new issue and use the template.) But, it's suspicious that no analysis works, even Jedi. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
This aren't the trace logs the troubleshooting asked for, unfortunately. Can you set |
Beta Was this translation helpful? Give feedback.
-
Ok, I have changed that setting and attached is the new output. Is this what you mean? Also, for what it's worth, Intellisense happens to be working right now, although it has been intermittently working and not working over the past few days. |
Beta Was this translation helpful? Give feedback.
-
You seem to be opening your entire home folder as your workspace, so we're getting stuck trying to scan all of the files before starting to analyze them. Can you open the specific project you are editing, rather than the entire home folder? This is made worse by using WSL on Windows folders, as IO between WSL and Windows folders is quite slow. |
Beta Was this translation helpful? Give feedback.
-
Ah I understand, I didn't realize the extension was analyzing all files in the workspace rather than just the few I had open. VS code seemed to have just been defaulting to opening my entire home folder. Now that I open a more specific folder containing the code that I am editing, the extension seems to load much faster. Lesson learned! |
Beta Was this translation helpful? Give feedback.
-
It only analyzes the ones you've opened, but at the moment, we scan for a list of files in the workspace so we can do things like distinguish library files from user files (so that you can't rename a function from the standard library, for example). We've gotten a pretty significant number of issues lately about this; it may be worth some thought figuring out how we can avoid this work when we're not in workspace diagnostic mode (so therefore only need the list of source files for specific operations). |
Beta Was this translation helpful? Give feedback.
-
We still need this list to do implement features like "Go to references", "Find all references", etc. However, we may want to time-bound the scan and cut it short (perhaps with an accompanying error dialog) if it's taking a long time — say, more than 20 sec. We should probably also see what the typescript LS is doing. I thought they had similar scanning logic, but perhaps they've come up with an alternative approach to work around issues like this. |
Beta Was this translation helpful? Give feedback.
-
asking is basically making source scanning lazy. we only check file tracking at the time of file open and only do full scanning when solution wide feature is executed such as find all reference, rename, workspace symbol or workspace wide diagnostic mode. |
Beta Was this translation helpful? Give feedback.
-
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
-
Discussed in microsoft/vscode-python#16700
Originally posted by abartlett004 July 15, 2021
Suddenly, the auto-complete and colored font features of Intellisense are no longer working for me, although it seems that pylint is still working because it has found problems in my script. I have tried closing and reopening VS code, uninstalling and reinstalling VS code, uninstalling and reinstalling the Python, Jupyter, and Pylance extensions, and changing my Python language server settings from default to Pylance to Jedi and back again with no success.
I am using VS code 1.58 and Python 3.7.9. Any ideas as to what could be causing this? I'm happy to provide any additional info.
Beta Was this translation helpful? Give feedback.
All reactions