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

Watch for changes in directory structure #846

Merged
merged 2 commits into from
Apr 23, 2021

Conversation

aeisenberg
Copy link
Contributor

@aeisenberg aeisenberg commented Apr 23, 2021

This ensures that directories renamed, added or deleted are
properly checked to see if they contain tests. The test tree
will be correctly updated when any directory changes.s

Fixes #799.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [n/a] @github/docs-content-codeql has been cc'd in all issues for UI or other user-facing changes made by this pull request.

This ensures that directories renamed, added or deleted are
properly checked to see if they contain tests. The test tree
will be correctly updated when any directory changes.s
this.watcher.addWatch(new RelativePattern(results.watchPath, '**/*.{ql,qlref}'));
// need to explicitly watch for changes to directories themselves.
this.watcher.addWatch(new RelativePattern(results.watchPath, '**/'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is all directories under a workspace folder? Any noticeable hit to performance on a large repo? Do we need to exclude database source archives?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing noticeable. I renamed the ql folder that is a submodule in the starter repo and there was no noticeable lag in the file explorer. The test explorer itself took a few seconds to update, but I think that's fair because it needs to re-discover the entire tree.

We don't need to do any special handling for source archives since they are readonly and aren't watched for changes.

@aeisenberg aeisenberg merged commit fce9bbc into github:main Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test Explorer consistently does not detect certain file actions
2 participants