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

Ignore file watcher events for paths in files.exclude #11455

Closed
bobbrow opened this issue Sep 21, 2023 · 4 comments
Closed

Ignore file watcher events for paths in files.exclude #11455

bobbrow opened this issue Sep 21, 2023 · 4 comments
Assignees
Labels
fixed Check the Milestone for the release in which the fix is or will be available. Language Service performance
Projects
Milestone

Comments

@bobbrow
Copy link
Member

bobbrow commented Sep 21, 2023

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

@arathburgos05
Copy link

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.

@heartacker
Copy link

please

@bobbrow bobbrow self-assigned this May 6, 2024
@bobbrow bobbrow added this to Triage in 1.21 via automation May 6, 2024
@bobbrow bobbrow added this to the On Deck milestone May 6, 2024
@bobbrow bobbrow moved this from Triage to In progress in 1.21 May 6, 2024
@sean-mcmanus sean-mcmanus modified the milestones: On Deck, 1.21.0 May 7, 2024
@sean-mcmanus sean-mcmanus moved this from In progress to Pull Request in 1.21 May 7, 2024
@bobbrow bobbrow added the fixed Check the Milestone for the release in which the fix is or will be available. label May 8, 2024
@bobbrow bobbrow moved this from Pull Request to Done in 1.21 May 8, 2024
@heartacker
Copy link

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

@bobbrow bobbrow modified the milestones: 1.21.0, 1.21 Jun 17, 2024
@sean-mcmanus
Copy link
Collaborator

@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed Check the Milestone for the release in which the fix is or will be available. Language Service performance
Projects
Status: Done
1.21
Done
Development

No branches or pull requests

4 participants