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

CodeQL: Open test as current database #393

Open
aeisenberg opened this issue May 22, 2020 · 3 comments
Open

CodeQL: Open test as current database #393

aeisenberg opened this issue May 22, 2020 · 3 comments
Labels
enhancement New feature or request VSCode

Comments

@aeisenberg
Copy link
Contributor

aeisenberg commented May 22, 2020

Note: this issue is currently blocked, but adding it here so we know to work on it when the blocker is removed.

When a test fails, I can right-click on it and have the useful options to see or accept the difference. One other useful thing to do is to locate the test database on disk and set it as the current database so that I can run queries and quick-evaluations against it.

However, there are currently issues with database corruption when you run tests while the test database is open in codeql, so currently we don't want to make it easier to open the test data and hit this problem more often than they do currently until we fix that problem.

@aeisenberg aeisenberg added the enhancement New feature or request label May 22, 2020
@aeisenberg
Copy link
Contributor Author

Comment from @tausbn:

On a whim, I tried renaming the database before importing it, and so far this seems to have none of those evaluation errors. Could this be a solution? Instead of sharing the database with the test, simply import a copy of it? I feel like it would certainly be better than what we have now. (We could even name the database "Snapshot of such and such test made at such and such time" to make more clear that this database is unaffected by changing the test files.)

@aeisenberg
Copy link
Contributor Author

A workaround is to do the following:

  1. Remove the .testproj extension
  2. Run the codeql database cleanup command on the database
  3. Import into vscode

@Marcono1234
Copy link
Contributor

However, there are currently issues with database corruption when you run tests while the test database is open in codeql, so currently we don't want to make it easier to open the test data and hit this problem more often than they do currently until we fix that problem.

Is that still relevant after #868?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request VSCode
Projects
None yet
Development

No branches or pull requests

3 participants