-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Recursive or looping symlinks can cause language server to repeatedly analyze files #2613
Comments
Thanks for letting us know about this issue, @richardwb. I'm having a little trouble reproducing the issue. I set up a directory structure as described and did not see any problems (nor any unexpected output in the |
It could be more obvious with a bit more code to analyze, but turning on trace level output seems to reliably demonstrate this for me in the output window. I just tried with a clean VSCode Insiders build, with just the Python extension installed (also Insiders build, today's). The only contents of my settings.json file is this:
I took the contents of this archive: test.tar.gz, extracted it to a location (say The version of Python I use doesn't really seem to make a difference, I tried both a pyenv Python 3.6 and a brew-installed Python 2.7. |
Thanks for the extra info. I'll take a look today. |
Sorry for the delay. I was able to reproduce the problem using the latest extension code (and latest language server). We'll work on sorting it out. |
Created upstream issue microsoft/python-language-server#181 |
Upstream issue has been marked fixed. |
Closing as upstream issue has been resolved. |
I commented previously on #2297 but I found that symlinks were still causing problems after I grabbed a recent build today.
Environment data
Actual behavior
The Python language server gets caught in a super deep nest of recursive symlinks. The repro case given completes quickly (there's nothing to analyze) but still demonstrates the problem, I think.
If there is actual code to parse/analyze it pretty much goes on forever. "Analyzing workspace, #### items remaining" goes down and then quickly shoots up, and this repeats over and over.
I can workaround this by adding the offending symlinks/folder structures to a VSCode exclusion list.
Expected behavior
The Python language server should be able to handle these structures in some reasonable way.
Steps to reproduce:
import folder.lib
.folder/symlink/folder/symlink/
folder structure.Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
)Symlinks to a common folder (e.g. two projects which have a symlink to the same folder) also get re-analyzed but that's usually okay as analysis is pretty fast in general.
The text was updated successfully, but these errors were encountered: