Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 tasks done
bpasero opened this issue Jan 14, 2022 · 3 comments
Closed
4 tasks done

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

bpasero opened this issue Jan 14, 2022 · 3 comments

Comments

@bpasero
Copy link
Member

bpasero commented Jan 14, 2022

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)
@karthiknadig
Copy link
Member

This worked really well on linux and windows. On windows i specifically wanted to test the windows store location. that is a special folder where the files are actually 'reparse points', and it works really well there too. Fantastic work.

@karthiknadig karthiknadig removed their assignment Jan 26, 2022
@sandy081
Copy link
Member

Good job 👏. Works very nice.

@sandy081 sandy081 removed their assignment Jan 26, 2022
@bpasero
Copy link
Member Author

bpasero commented Jan 27, 2022

Thanks, credits to Windows team though for implementing the best OS file watcher across all operating systems. ReadDirectoryChangesW is awesome and is used by the file watcher library we use.

@bpasero bpasero modified the milestones: February 2022, January 2022 Feb 24, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants