Fix the file watcher by bobbrow · Pull Request #1983 · microsoft/vscode-cpptools

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@bobbrow

Copy link Copy Markdown

Member

@bobbrow bobbrow commented

May 11, 2018

Something must have changed in VS Code with the file watcher API because we stopped getting file created/deleted events. This change fixes it.

// WARNING: The default limit on Linux is 8k, so for big directories, this can cause file watching to fail.
this.rootPathFileWatcher = vscode.workspace.createFileSystemWatcher(
path.join(this.RootPath, "*"),
"**/*",
Copy link Copy Markdown

Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that we don't get file delete notifications for every file in a deleted folder, so we'll need to update the language server to take care of that specially.

@bobbrow bobbrow merged commit 8f8ed52 into master

May 11, 2018

@bobbrow bobbrow deleted the bobbrow/filewatcher branch

May 11, 2018 19:33

@github-actions github-actions bot locked and limited conversation to collaborators

Oct 15, 2020

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@sean-mcmanus sean-mcmanus sean-mcmanus approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@bobbrow @sean-mcmanus