-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Ignore tsserver requests for createDirectoryWatcher(~/Library) on macOS #227653
Conversation
5ea81e9
to
bdef085
Compare
bdef085
to
39c063b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some feedback inline.
@@ -5,6 +5,7 @@ | |||
|
|||
import * as path from 'path'; | |||
import * as vscode from 'vscode'; | |||
import { homedir } from 'os'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import breaks the web build, needs to update fallback in
vscode/extensions/shared.webpack.config.js
Line 118 in 6896254
fallback: { |
Module not found: Error: Can't resolve 'os' in '/mnt/vss/_work/1/s/extensions/typescript-language-features/src'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
- install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "os": false }
Details:
domainEmitter: [object Object]
domainThrown: false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will check, I had a feeling this would break
This is an attempt to mitigate microsoft/TypeScript#59831
Currently 6e8e175 fixes one specific symptom, causing macOS security dialogs
But a recursive directory watcher on ~/Library is still undesirable, as it results in events coming in for all sorts of files belonging to other apps. Combined with parcel-bundler/watcher#186, this results in VSCode making open calls to all sorts of sensitive files such as
~/Library/Safari/RecentlyClosedTabs.plist
Excessive watching under ~/Library also causes performance problems, and in some cases affects legitimate events flowing through. For example I have experienced my editor stops noticing changes to the git repo approximately ~3h after seeing the macOS security dialog.
//cc @bpasero
EDIT: without a proper fix it appears other prompts will get triggered