Skip to content

Test: New multi-root aware file watcher #29478

Closed

Description

Test for #28947

Complexity: 5

  • Linux 64 Bits - @isidorn
    • Opened tab is updated when modified outside of VS Code
    • Explorer updates when file events occur outside of VS Code (eg. another editor/git checkout)
    • Adding/removing root folders does not confuse the watcher and events are reported for newly added folders (note: when you transition back to single root, we stop using NSFW unless the files.useExperimentalFileWatcher is set to true)
    • Supports files.watcherExclude setting in different folders to ignore events
    • Symlinks are followed (e.g. you get file events for symlinked folder contents)
    • Prevents circular symlinks (e.g. no endless loop when you have this on disk)
    • Supports large folders - what happens when the file watch limit is hit and you're hit with an ENOSPC? (see here for how to configure this)
    • Supports remote file systems (e.g. use Parallels to see folders from Windows and/or macOS and verify events are forwarded through)
  • Linux 32 Bits - @joaomoreno
    • Opened tab is updated when modified outside of VS Code
    • Explorer updates when file events occur outside of VS Code (eg. another editor/git checkout)
    • Adding/removing root folders does not confuse the watcher and events are reported for newly added folders (note: when you transition back to single root, we stop using NSFW unless the files.useExperimentalFileWatcher is set to true)
    • Supports files.watcherExclude setting in different folders to ignore events
    • Symlinks are followed (e.g. you get file events for symlinked folder contents)
    • Prevents circular symlinks (e.g. no endless loop when you have this on disk)
    • Supports large folders - what happens when the file watch limit is hit and you're hit with an ENOSPC? (see here for how to configure this)
    • Supports remote file systems (e.g. use Parallels to see folders from Windows and/or macOS and verify events are forwarded through)
  • macOS - @sandy081
    • Opened tab is updated when modified outside of VS Code
    • Explorer updates when file events occur outside of VS Code (eg. another editor/git checkout)
    • Adding/removing root folders does not confuse the watcher and events are reported for newly added folders (note: when you transition back to single root, we stop using NSFW unless the files.useExperimentalFileWatcher is set to true)
    • Supports files.watcherExclude setting in different folders to ignore events
    • Symlinks are followed (e.g. you get file events for symlinked folder contents)
    • Prevents circular symlinks (e.g. no endless loop when you have this on disk)
    • Supports folders with unicode characters in their name (see OS X 10.11: system calls return non-normalized unicode strings nodejs/node#2165 for the glory details on unicode normalization on HFS and node)
    • Supports opening paths with wrong casing - eg. /foo is on disk but /FOO is the folder that is opened (via the command line) and file events continue to work
    • Supports remote file systems (e.g. use Parallels to see folders from Windows and/or Linux and verify events are forwarded through)
  • Windows - @mjbvz
    • Opened tab is updated when modified outside of VS Code
    • Explorer updates when file events occur outside of VS Code (eg. another editor/git checkout)
    • Adding/removing root folders does not confuse the watcher and events are reported for newly added folders (note: when you transition back to single root, we stop using NSFW unless the files.useExperimentalFileWatcher is set to true)
    • Supports files.watcherExclude setting in different folders to ignore events
    • Symlinks are followed (e.g. you get file events for symlinked folder contents)
    • Prevents circular symlinks (e.g. no endless loop when you have this on disk)
    • Supports virtual drives (setup via subst command)
    • Supports UNC mounted filesystems (there is a notation to do this via localhost: \\localhost\c$\my_dir)
    • Supports OneDrive folders
    • Briefly verify watcher supports Windows 7
    • Supports opening paths with wrong casing - eg. /foo is on disk but /FOO is the folder that is opened (via the command line) and file events continue to work
    • Supports remote file systems (e.g. use Parallels to see folders from macOS and/or Linux and verify events are forwarded through)

https://github.com/Axosoft/nsfw has been introduced behind a setting that allows file watching to use the same underlying library for all OS's as well as being multi-root aware. The file watcher can be enabled by using the setting "files.useExperimentalFileWatcher": true, or by just opening multiple folders.

The major test cases are highlighted above, make sure you refresh as you're checking a checkbox off to prevent update conflicts. Most of which will involve modifying a file and observing the file event propagates.

You can add a multi-root folder by opening a folder in VS Code and then using the File: Add Root Folder... command. This adds the relevant settings to your user settings. Also be sure to launch VS Code using code-insiders --verbose to get file watcher events in the devtools console, this will help verify events are firing correctly and will be very valuable in debugging issues. To verify you are using the new watcher, check the console for this entry:

image

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions