-
Notifications
You must be signed in to change notification settings - Fork 189
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
Quick Eval on Mac for Standard QL Libraries Not Functioning Correctly #3609
Comments
@knewbury01 Quick question: How exactly are you invoking Quick Eval: Context menu in the editor pane, key binding, command palette? And what's the exact text of the menu command you're invoking (we have a couple similar commands depending on whether you've got the Canary feature flag enabled or not). |
@NlightNFotis will triage this. |
Hello, I have spent some time on this and I have been unable to reproduce this (more precisely: I'm seeing the expected behaviour) following the instructions. My extension version is
I have attached a small screen recording that shows me following the steps, just to make sure I'm not missing anything obvious. The only step missing is the Screen.Recording.2024-05-30.at.10.43.55.movWill spend a bit of time to see if I can downgrade the version used and see if I can reproduce in this manner, but I hope it's a positive signal that it's not reproducible in the latest version - modulo me being wrong in the repro method I'm using. |
@NlightNFotis the feature works as expected for myself as well with bundles (or checkouts of the codeql repo for the libs), the problem has only been observed when using the "Install Pack Dependencies" functionality |
Hm, when I did a first run of the triage, I downloaded the I'm wondering if there's a different way I should execute the |
Ahh, wait, re-reading your comment I think I understand what you mean. I will try again from a repo where the This will probably happen towards the end of the day, as I'm currently working on something else. |
@knewbury01 I've tried again in a new repository, copying the example Python query, and adding the example The files added look like this:
/**
* @name Empty scope
* @kind problem
* @problem.severity warning
* @id python/example/empty-scope
*/
import python
from Scope s
where count(s.getAStmt()) = 0
select s, "This is an empty scope."
# Change 'getting-started' to a user name or organization that you have write access to
name: getting-started/codeql-extra-queries-python
version: 0.0.0
dependencies:
# This uses the latest version of the codeql/python-all library.
# You may want to change to a more precise semver string.
codeql/python-all: "*" In the VSCode extension settings I'm referencing a CLI versioned 2.16.4. I proceed to install the pack dependencies referenced in the If I navigate to the So the error as far as I understand is predicated on the CodeQL CLI not having a query pack present and installing it through the Would it be possible to record a short video with the MacOS |
@NlightNFotis are you using the codeql bundle (downloaded from github/codeql-action)? This version includes the dependencies with it. Instead, you can download the CLI from https://github.com/github/codeql-cli-binaries. Even better you can use the
|
Thanks Andrew, yeah this is where I had sourced the I will give this another try later today following what you suggested and report back here. |
Let me know if you need any help. I'm around. Or we can go through this together at the offsite next week. |
@aeisenberg @NlightNFotis ah yep, sorry maybe hadnt been explicit enough on that part, I observe this problem when the standalone CLI distribution is paired with the Install Pack Dependencies functionality |
Hello, update: I've followed what Andrew suggested, and I can confirm that I'm now seeing the issue described in the OP:
I've followed this traceback, and it appears to be coming from the CLI (as in, the error seems to be coming from the CodeQL server). I'll follow up with Andrew as to the next best step here. |
Hello, we have been able to reproduce this, and are now tracking this internally. |
Describe the bug
Quick eval in out of the box QL libraries (on Mac) does not succeed in any circumstance
Version
The CodeQL and VSCode extension version in which the bug occurs.
CodeQL CLI 2.15.5 and extension 1.13.0
(but other CLIs too have been observed to have same issue - 2.14.6, 2.16.4, multiple pairings of standard library versions)
To reproduce
When developing a custom query, for which "Install Pack Dependencies" has been used to get the libraries, and a codeql-pack.lock.yml is successfully generated, then any QL class is used in the custom query, a jump to definition successfully navigates to the expected .qll definition in the packages location for the lib version listed in the lock file. However any quick evals on any predicates in any library fail. Clearly the extension/CLI can resolve the library because the custom query using the library succeeds (full eval completes, any quick evals complete, no error messages etc). However it is less ideal that quick evals cannot be used for quick checks.
Expected behavior
Click quick eval on any class name/predicate etc in a library file and get a result/complete evaluation
Additional context
error message:
The text was updated successfully, but these errors were encountered: