vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Ignore file watcher events for paths in files.exclude

Open bobbrow opened this issue 2 years ago • 2 comments
trafficstars

Environment

n/a

Bug Summary and Steps to Reproduce

DefaultClient.registerFileWatcher registers a watcher for the workspace and we send file create/delete/change events to cpptools when they happen.

However, I'm seeing that we receive events for changes to the .git folder which is in the default files.exclude list. This creates a bit of noise for the extension. We should update the file watcher to discard events for files that we don't care about. files.exclude should be honored and I think C_Cpp.files.exclude should too. I am aware that there is files.watcherExclude, but by default it has a different pattern than files.exclude for some reason and doesn't cover the entire .git folder.

    "files.watcherExclude": {
        "**/.git/objects/**": true,
        "**/.git/subtree-cache/**": true,
        "**/node_modules/*/**": true,
        "**/.hg/store/**": true
    },
    "files.exclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/Thumbs.db": true
    }

Configuration and Logs

n/a

Other Extensions

No response

Additional context

No response

bobbrow avatar Sep 21 '23 22:09 bobbrow

I agree with you. I realized of something similar.

On the other hand, I'm stuck with a feature. Do you mind taking a look at #11609 please? Maybe there is a solution that i don't know.

Regards.

arathburgos05 avatar Nov 02 '23 07:11 arathburgos05

please

heartacker avatar May 06 '24 16:05 heartacker

bobbrow 已将这个从 Pull Request 移动到 1.21 中的 Done

heartacker avatar May 28 '24 21:05 heartacker

Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.21.0

sean-mcmanus avatar Jun 17 '24 23:06 sean-mcmanus