Skip to content

Test: out-of-workspace file watching from extensions #140693

@bpasero

Description

@bpasero

Refs: #3025

Complexity: 4

Create Issue


The existing API vscode.workspace.createFileSystemWatcher was changed to enable extensions to watch paths that are outside the opened workspace.

Note: when you open an empty window, any path is considered to be "out of workspace". Otherwise, a path is "out of workspace" when it is not within any of the opened folders.

Testing

  • read through the updated JSDoc of vscode.workspace.createFileSystemWatcher and report back if you cannot understand the behaviour or have suggestions for how to improve it
  • verify a watched folder path that is outside of workspace reports events when changing child files (with a non-recursive glob pattern)
  • verify a watched folder path that is outside of workspace reports events when changing any child files within (with a recursive glob pattern)
  • verify a watched file path that is outside of workspace reports events when the file
  • verify that using just a string for createFileSystemWatcher only emits changes for workspace files and not for any other watched path outside the workspace
  • verify that your events stop reporting when you dispose the watcher
  • watch out for error messages in devtools or the shared process devtools (that is where all watchers run)
  • ensure filewatcher processes are not hanging around, i.e. exit when the window closes (there will be one file watcher process per opened window)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions