Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

Turn off path watcher by default #1841

Merged
merged 29 commits into from
Dec 16, 2019

Conversation

MikhailArkhipov
Copy link

Fixes #1608
Fixes #1800
Fixes #1834
Fixes #1839

MikhailArkhipov added 28 commits September 30, 2019 12:03
@jakebailey
Copy link
Member

Can you add something to TROUBLESHOOTING with regards to this? Something like:

- Library search path watching is currently disabled by default (#1839). If you require this feature, set `"python.analysis.watchSearchPaths": true` in your user settings.

@JanMatas
Copy link

Hi, is the hypothesis here that the filesystem watcher itself is broken or there is some issue in the interaction between watcher and language server? Is there some other issue/repo where we could track this?

@jakebailey
Copy link
Member

jakebailey commented Dec 16, 2019

Mainly the latter, but there are other issues with file watching. Having the watcher on all the time breaks the analysis if it's in progress (usually not, but sometimes yes), which isn't a simple fix. Past that, the watcher appears to fire without reason on some systems, and not operate at all on others. There is not an open issue about reenabling this at the moment, no. A better solution is to make the LSP client do this, but that has its issues as well.

@JanMatas
Copy link

Just an idea, would it help to ignore (queue) the events while analysis is in progress? If you think this would help, we can try to make a PR.

@MikhailArkhipov
Copy link
Author

There are more issues than just reset during analysis. Sometimes it is hard to tell library code from user code so we had issues when user changing their code triggers complete reload.
It is simple to turn watcher back on.

"python.analysis.watchSearchPaths": true

MikhailArkhipov pushed a commit that referenced this pull request Jun 15, 2020
* Remove stale reference

* Don't suppress LHS diagnostics on augmented assign

* Revert "Don't suppress LHS diagnostics on augmented assign"

This reverts commit 6109ac7.

* Escape [ and ]

* PR feedback

* Turn off file watcher by default

* Update per change to the setting default

(cherry picked from commit 226221e)
MikhailArkhipov pushed a commit that referenced this pull request Jun 15, 2020
* Remove stale reference

* Don't suppress LHS diagnostics on augmented assign

* Revert "Don't suppress LHS diagnostics on augmented assign"

This reverts commit 6109ac7.

* Escape [ and ]

* PR feedback

* Turn off file watcher by default

* Update per change to the setting default

(cherry picked from commit 226221e)
@cnaccio
Copy link

cnaccio commented Oct 1, 2020

For some reason I'm not seeing the python.analysis.watchSearchPaths setting? Using vscode v1.49 on osx. Any advice?

@jakebailey
Copy link
Member

It's a hidden setting. You can ignore the warning from the editor.

You may want to consider using Pylance, which doesn't suffer from the problems leading to the disabling of file watching.

@cnaccio
Copy link

cnaccio commented Oct 1, 2020

Lol, I literally just had the realization that it was a hidden setting after spending hours on this... Thanks @jakebailey !

Pylance looks super interesting, and worked perfectly; will run with that.

Thanks for the help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants