LanguageClient-neovim
LanguageClient-neovim copied to clipboard
Infinite recursion on recursed directory structure
- Did you upgrade to latest plugin version?: Yes
- Did you upgrade to/compile latest binary? Run shell command
bin/languageclient --versionto get its version number.languageclient 0.1.160 - (Neovim users only) Did you check output of
:checkhealth LanguageClient?
- OK: binary found: /mnt/harmonix_vol2/soporifix_vol3/user/home/vic/.local/share/nvim/plugged/LanguageClient-neovim/bin/languageclient
- OK: languageclient 0.1.160
- OK: Floating window is supported and will be used for hover
- Did you check troubleshooting? Yes
Describe the bug
When the directory structure of current working directory containing recursive structure via symlinks, LanguageClient-neovim will get stuck into an infinite loop:
09:57:19 INFO unnamed src/language_server_protocol.rs:2818 Start watching path "last/bin/parent/bin/parent/bin/parent/bin/parent/bin/parent/bin/parent/bin/parent/bin/parent/bin/parent/ActualFile"
Here parent is a symlink to its parent, creating a recursive structure.
Could you provide an example tree of the directories you have in your project so that I can try and reproduce this?
EDIT: Never mind, just managed to reproduce.
I'm actually not sure what the proper solution to this would be. Not following symlinks would probably cause unexpected behaviour for other users, so I guess we have to follow them. But we'd probably have to try and detect if they are recursive somehow.
Hi, sorry for the late response. Glad you can reproduce this on your end.
Regarding the best way to fix this issue, I feel like we can follow vscode's approach by just watching all events from the project root, and filter incoming events based on the glob. In this way we can avoid the recursive structure problem.