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

Isolate watchers from each other #153009

Closed
bpasero opened this issue Jun 23, 2022 · 1 comment
Closed

Isolate watchers from each other #153009

bpasero opened this issue Jun 23, 2022 · 1 comment
Assignees
Labels
debt Code quality issues feature-request Request for new features or functionality file-watcher File watcher
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Jun 23, 2022

Our current file watching strategy is that many locations can ask to watch a path but the events will always be submitted through a single file service event without knowing the origin.

This means every extension that manages to create a file system watcher will still receive all events from all other watchers from other extensions.

Ideally we can isolate the request to watch in a way that the events returned are only for the request specifically. This will mainly avoid duplicate events, less likely wrong events which I think still cannot occur given our glob pattern matching.

@bpasero bpasero added debt Code quality issues file-watcher File watcher labels Jun 23, 2022
@bpasero bpasero added this to the Backlog milestone Jun 23, 2022
@bpasero bpasero self-assigned this Jun 23, 2022
@bpasero bpasero added the feature-request Request for new features or functionality label Jul 25, 2022
@bpasero bpasero removed their assignment Jul 25, 2022
@bpasero bpasero self-assigned this Dec 6, 2022
@bpasero
Copy link
Member Author

bpasero commented Dec 20, 2022

This is quite hard to achieve with our current API where a file system provider has a watch method:

watch(uri: Uri, options: { readonly recursive: boolean; readonly excludes: readonly string[] }): Disposable;

But all events go through the onDidChangeFile event without correlation back to the original watch request:

readonly onDidChangeFile: Event<FileChangeEvent[]>;

But we still can do something for avoiding duplicate events as reported in #163352: #169609

@bpasero bpasero closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues feature-request Request for new features or functionality file-watcher File watcher
Projects
None yet
Development

No branches or pull requests

1 participant