Skip to content
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

createDirectoryWatcher called for in-memory file #59508

Open
mjbvz opened this issue Aug 1, 2024 · 1 comment
Open

createDirectoryWatcher called for in-memory file #59508

mjbvz opened this issue Aug 1, 2024 · 1 comment
Assignees
Labels
Bug A bug in TypeScript

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Aug 1, 2024

πŸ”Ž Search Terms

  • createDirectoryWatcher
  • VS code file watcher

πŸ•— Version & Regression Information

5.6.0-dev.20240729

Not a regression

⏯ Playground Link

No response

πŸ’» Code

microsoft/vscode#221583

It appears that TS sometimes tries creating a directory watcher for in memory files. For example, I see these calls in the TS Server logs:

Info 46165[16:37:11.625] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
Info 46166[16:37:11.646] DirectoryWatcher:: Added:: WatchInfo: ^/vscode-chat-code-block/899b87a4-39f1-4438-af0b-c7a57080a918/response_0/0#... 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
Info 46167[16:37:11.646] event:
    {"seq":0,"type":"event","event":"createDirectoryWatcher","body":{"id":4619,"path":"^/vscode-chat-code-block/899b87a4-39f1-4438-af0b-c7a57080a918/response_0/0...","recursive":false,"ignoreUpdate":true}}
Info 46168[16:37:11.647] Elapsed:: 0.07062499225139618ms DirectoryWatcher:: Added:: WatchInfo: ^/vscode-chat-code-block/899b87a4-39f1-4438-af0b-c7a57080a918/response_0/0#... 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations

πŸ™ Actual behavior

These are purely in-memory files so we shouldn't create watchers or directory watchers for them\

πŸ™‚ Expected behavior

Watchers should not be created. There's no directory that can change here

Additional information about the issue

No response

@mjbvz
Copy link
Contributor Author

mjbvz commented Aug 1, 2024

Going to add some workarounds on the VS Code side but would be best to avoid these calls in the first place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants