Skip to content

Automatically add .dart_tool to the watch exclusion list #742

Closed

Description

@natebosch

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?

Activity

  1. added this to the v2.12.0 milestone on Mar 27, 2018
  2. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Mar 27, 2018
  3. DanTup commented on Mar 27, 2018

    @DanTup
    Member

    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).

  4. added
    in editorRelates to code editing or language features
    on Mar 27, 2018
  5. DanTup commented on Mar 28, 2018

    @DanTup
    Member

    Can't find a way to do this, so I've opened microsoft/vscode#46851.

  6. modified the milestones: v2.12.0, Backlog on Mar 28, 2018
  7. kevmoo commented on Mar 29, 2018

    @kevmoo
    Contributor

    Also: .dart_tool is also used by pub in Dart v2. So most projects will want this ignored.

  8. DanTup commented on Mar 29, 2018

    @DanTup
    Member

    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.

  9. modified the milestones: Backlog, On Deck on Jan 30, 2019
  10. DanTup commented on Jan 30, 2019

    @DanTup
    Member

    It's not just the watchers that cause issues here, seems like the analyzer reports issues here too:

    screenshot 2019-01-30 at 4 59 50 pm

    @bwilkerson could/should we automatically exclude these in the analyzer? Otherwise in the editor we'll need to walk the tree looking for .dart-tool folders to exclude them (and watch for new ones being added, and exclude them).

  11. modified the milestones: On Deck, Backlog on May 26, 2020
  12. modified the milestones: Backlog, v3.30.0 on Dec 9, 2021
  13. added a commit that references this issue on Dec 9, 2021
  14. DanTup commented on Dec 9, 2021

    @DanTup
    Member

    The latest VS Code lets us contribute these exclusions without overwriting them all so I've added .dart_tool to the watcher exclusions (I didn't add it to files.exclude so 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, android etc. for Flutter, but I'm not certain that's sound or the full implications of doing so).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions