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 Explorer consistently does not detect certain file actions #799

Closed
Marcono1234 opened this issue Mar 21, 2021 · 2 comments · Fixed by #846
Closed

Test Explorer consistently does not detect certain file actions #799

Marcono1234 opened this issue Mar 21, 2021 · 2 comments · Fixed by #846
Assignees
Labels
bug Something isn't working good first issue Good for newcomers VSCode

Comments

@Marcono1234
Copy link
Contributor

Marcono1234 commented Mar 21, 2021

Version
CodeQL CLI v.2.4.6
Extension v1.4.4

OS: Windows 10

Describe the bug
It appears the Test Explorer consistently does not detect certain file actions, requiring a restart of VSCode for them to be detected (or adding new test files; this seems to update the view as well).

Affected:

  • Extension never detects deletion of folders containing tests
  • Extension never detects renaming folders containing tests
  • Extension never detects moving folders containing tests, e.g. moving /some-tests/test.qlref inside of /parent-of-tests

It is probably not an issue with codeql resolve tests, because that seems to report the correct directories.

To Reproduce
Try performing any of the actions above and see whether the Test Explorer notices the change.

In case you cannot reproduce this, try opening https://github.com/Marcono1234/codeql-java-queries in VSCode as folder (have not tested as workspace), try the performing the actions described above with any of the folders under codeql-custom-queries-java/tests and see whether the Test Explorer notices the changes.

Expected behavior
The Test Explorer should notice the file actions described above and adjust the view accordingly.

Additional context
I think I have also experienced #310 a few times, however I cannot reproduce it.

@Marcono1234 Marcono1234 added the bug Something isn't working label Mar 21, 2021
@aeisenberg
Copy link
Contributor

Hmm...our test discovery is probably not kicking off when folders change.

@aeisenberg aeisenberg added the good first issue Good for newcomers label Apr 13, 2021
@aeisenberg aeisenberg self-assigned this Apr 23, 2021
@aeisenberg
Copy link
Contributor

The problem is that our file watcher explicitly only looks for changes to ql and qlref files. Changes to directories are ignored (even if they contain ql and qlref files). It's an easy fix to add a second pattern that matches directories, but I am concerned about performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers VSCode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants