Automatically add .dart_tool to the watch exclusion list #742
Copy link
Copy link
Closed
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.An enhancement or improvement that should be listed in release notes but is not a bug fix.
Milestone
Description
Does a VS code plugin have the ability to update the workspace watch exclusion list? As more users migrate to build_runner we'll have more occurrences of this directory with lots of files and excluding it can prevent the editor from picking up too many file watchers which are a limited resource.
See https://gitter.im/dart-lang/angular?at=5aba15b9e4ff28713a7aeb6e
If we can't do it automatically should we document it somewhere?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.An enhancement or improvement that should be listed in release notes but is not a bug fix.
Activity
DanTup commentedon Mar 27, 2018
I'm not sure if we could contribute it without overwriting anything they've set themselves, but I'll take a look (and if we can't do it, I'll raise a feature request with Code to see if they can support it somehow).
DanTup commentedon Mar 28, 2018
Can't find a way to do this, so I've opened microsoft/vscode#46851.
kevmoo commentedon Mar 29, 2018
Also:
.dart_toolis also used by pub in Dart v2. So most projects will want this ignored.DanTup commentedon Mar 29, 2018
The issue I opened with Code has been assigned to the April milestone, so hopefully we'll get a clean way to handle this (but the April release doesn't ship till early May).
We could edit the users settings for them in the meantime, but since we have to copy the whole list (they don't get merged together) it feels a nit nasty.
DanTup commentedon Jan 30, 2019
It's not just the watchers that cause issues here, seems like the analyzer reports issues here too:
@bwilkerson could/should we automatically exclude these in the analyzer? Otherwise in the editor we'll need to walk the tree looking for
.dart-toolfolders to exclude them (and watch for new ones being added, and exclude them).Exclude .dart_tool at all levels
DanTup commentedon Dec 9, 2021
The latest VS Code lets us contribute these exclusions without overwriting them all so I've added
.dart_toolto the watcher exclusions (I didn't add it tofiles.excludeso it'll still show in the explorer - I thought it may be odd to hide it by default without being obvious to users).If there are any other folders we should consider adding (I did wonder about
build,ios,androidetc. for Flutter, but I'm not certain that's sound or the full implications of doing so).