Add quick eval count to the command palette#2475
Merged
Conversation
2f43f5d to
4b0dd5e
Compare
aeisenberg
reviewed
Jun 2, 2023
Contributor
aeisenberg
left a comment
There was a problem hiding this comment.
Looks good. 2 minor points inline.
extensions/ql-vscode/CHANGELOG.md
Outdated
| - Fix bug where the `CodeQL: Compare Query` command did not work for comparing quick-eval queries. [#2422](https://github.com/github/vscode-codeql/pull/2422) | ||
| - Update text of copy and export buttons in variant analysis results view to clarify that they only copy/export the selected/filtered results. [#2427](https://github.com/github/vscode-codeql/pull/2427) | ||
| - Add warning when using unsupported CodeQL CLI version. [#2428](https://github.com/github/vscode-codeql/pull/2428) | ||
| - Add `CodeQL: Quick Evaluation Count` command to generate the count of the selected item without having to compute locations or strings. |
Contributor
There was a problem hiding this comment.
Optional: do you think it would be better to include a reason why someone would want to use htis instead of standard quick eval (ie- to save computation time)?
Contributor
There was a problem hiding this comment.
Perhaps also some wording like "statistics" or "the number of results produced by the selected logic" so it's more obvious what the count is?
| async (progress, token) => { | ||
| if (!(await this.cliServer.cliConstraints.supportsQuickEvalCount())) { | ||
| throw new Error( | ||
| "Quick evaluation counts is not supported by this version of CodeQL CLI.", |
Contributor
There was a problem hiding this comment.
Suggested change
| "Quick evaluation counts is not supported by this version of CodeQL CLI.", | |
| `Quick evaluation counts is only supported by CodeQL CLI v${CliVersionConstraint.CLI_VERSION_WITH_QUICK_EVAL_COUNT} or later.", |
Contributor
There was a problem hiding this comment.
"count is" or "counts are"
4b0dd5e to
86c9ec7
Compare
added 7 commits
June 26, 2023 12:01
edc3b84 to
bbeb93b
Compare
aeisenberg
approved these changes
Jun 26, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows using quick-eval-count via the command palette. Quick eval count generates column counts and overall count of the results instead of generating locations and strings. As generating locations and strings can be expensive and the number of results is often more useful this can shave time off debugging complex queries. As this is fairly advanced and to avoid cluttering the context menu I have not added a context menu. We can revisit this in future.
@dbartol I am leaving it to you to decide how to integrate this into the debugging workflow. This should probably be treated like a quick-eval option there.
Checklist
ready-for-doc-reviewlabel there.