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 CLI enter path to executable creates odd query failures #2199

Closed
knewbury01 opened this issue Mar 22, 2023 · 4 comments
Closed

CodeQL CLI enter path to executable creates odd query failures #2199

knewbury01 opened this issue Mar 22, 2023 · 4 comments
Assignees
Labels
bug Something isn't working VSCode

Comments

@knewbury01
Copy link

knewbury01 commented Mar 22, 2023

Describe the bug
CodeQL extension shows red error squiggles but is able to execute query.
This happens to me specifically when:

  1. I have some CLI version already in the User space (2.10.5) - not sure if this part is relevant.
  2. I download a bundle version of CodeQL CLI (2.12.2)
  3. I update the workspace CodeQL path from empty to the 2.12.2 path
  4. open any query that I am working on , and the query shows the red errors, with the following message, but still executes.

Screenshot 2023-03-21 at 8 02 15 PM

Additionally , reload window does make the error squiggles go away , but then the query actually becomes un-runnable, seemingly no matter what else is done.

Screenshot 2023-03-21 at 8 05 53 PM

Version
The CodeQL and VS Code version in which the bug occurs.

CodeQL version: 2.12.2
CodeQL extension version: 1.8.0

To reproduce
listed above.
sample query:

 import java

from Expr e 
select e

sample qlpack.yml:

name: testworkshop
version: 0.0.0
dependencies:
    codeql/java-all: "*"

Expected behavior
No red squiggles present. and for reload window to not mysteriously break the environment.

Additional context
Add any other context about the problem here.

@knewbury01 knewbury01 added the bug Something isn't working label Mar 22, 2023
@knewbury01 knewbury01 changed the title CodeQL CLI updates apply oddly in editor CodeQL CLI enter path to executable creates odd query failures Mar 22, 2023
@aeisenberg
Copy link
Contributor

Hmmm...it looks like the language server wasn't retarted when you added the new CLI version. It was stil using 2.10, which would explain the error message "Unknown pragma..." since the assume_small_delta pragma was not introduced until later.

To be honest, I'm not entirely sure what the lifecycle of the language server is. I don't think the language server is restarted when there is a new CLI version being used.

The second error is something different and I will need to explore some more.

@aeisenberg
Copy link
Contributor

I'm thinking that the error with running the queries has to do with using the bundle. As a workaround, can you try using a non-bundle version of the CLI? (It's supposed to work with a bundle, but it's looking like for some reason, there is an issue).

@knewbury01
Copy link
Author

knewbury01 commented Mar 28, 2023

I'm thinking that the error with running the queries has to do with using the bundle. As a workaround, can you try using a non-bundle version of the CLI? (It's supposed to work with a bundle, but it's looking like for some reason, there is an issue).

@aeisenberg yep you were totally right, tried it today with a pack install and just CLI binary workflow and the reload window does clear up the error message!

@aeisenberg
Copy link
Contributor

I tried a few ways to reproduce this part of the error:

Additionally, reload window does make the error squiggles go away, but then the query actually becomes un-runnable, seemingly no matter what else is done.

but I could not.

It sounds like you are currently unblocked and there are no more reproducible errors, so I'll be closing this issue.

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

No branches or pull requests

2 participants