sublimelsp / LSP-pyright

Python support for Sublime's LSP plugin provided through microsoft/pyright.
MIT License
125 stars 13 forks source link

Exception when "installing file system watcher" #87

Open rwols opened 2 years ago

rwols commented 2 years ago

In the server log panel I see this message:

LSP-pyright: Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js

OS is Ubuntu 20.4. System node is v12. I have a Node v14 installed in $cache/Package Storage/lsp_utils/

rchl commented 2 years ago

https://github.com/paulmillr/chokidar says that on Linux fs.watch API is used and that does not provide recursive watching...

Kinda surprising since this library is used "everywhere" so I don't get how it could not support such basic need...

rchl commented 2 years ago

Oh, somehow I've assumed that this is related to my https://github.com/sublimelsp/LSP-file-watcher-chokidar but I guess this is internal error from Pyright instead. In that case an issue in the Pyright repo would likely receive a quick response.

rchl commented 2 years ago

https://stackoverflow.com/questions/61806341/how-to-fix-the-feature-watch-recursively-is-unavailable-on-the-current-platform has relevant answer

rchl commented 2 years ago

Pyright could fix it so that it wouldn't pass recursive: true on linux. Maybe not a great idea in case support is added in the future but can always be refined later.