question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adopt to new `include` option in `IFileService.watch`

See original GitHub issue

IFileService.watch method now supports a new include option that works like exclude but negated: only register to events that match a glob pattern. It doesnt really help for cases where you watch a folder and want to track for any change within, only when you watch a folder where you know other files are in that might change that you do not care about.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
bpaserocommented, Apr 6, 2022

Hm, maybe we should rather allow for IRelativePattern in the watch API because that solves the issue of combining a glob pattern with a path. We introduced that specifically to avoid having to join paths with patterns because you never know which format to use. I can look into that.

https://github.com/microsoft/vscode/blob/5a36ebebb9dbfb0967bc58f986752f316567fcb0/src/vs/base/common/glob.ts#L14-L29

0reactions
bpaserocommented, Apr 16, 2022

Pushed https://github.com/microsoft/vscode/commit/e6d98a13fcd3bf928d0e755eaae873ac200a98bd to allow for relative pattern in include. This should be possible now:

const userSettingsFolder = extUri.dirname(this.userSettingsResource);
this._register(this.fileService.watch(userSettingsFolder, { includes: [{ base: userSettingsFolder.fsPath, pattern: basename(this.userSettingsResource) }], excludes: [], recursive: false }));

Still requires the fix for https://github.com/microsoft/vscode/issues/147499

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimizing Your Inclusive Access Program From Adopt to Opt
The number of IA courses at Iowa State University nearly doubled between Fall 2018 and Spring 2019. RedShelf and bookstore Digital Course ...
Read more >
The Old New Win32API - GitHub
This page provides a list of links to subset of posts of Raymond Chen's famous blog The Old New Thing. The subset is...
Read more >
How to watch A&E's 'Adults Adopting Adults' tonight with or ...
Adult adoption is legal in the United States and the new A&E series ... Where can I watch 'Adults Adopting Adults' if I...
Read more >
Category: Object Oriented Programming - SEChannel
Greenfield : Unit testing is easier to adopt when you are starting a new application. ... Refactoring can include anywhere from making the...
Read more >
Bug List - Bugs - Eclipse
251420, AJDT, UI, AJDT-inbox, NEW, ---, [build] "Add JARs" in "Aspect ... NEW, ---, inconsistent Property Pages behavior with changed options, 2020-09-04.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found