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

VSCode extension AST viewer tab not showing AST for some files. #17068

Open
aaaayush-n opened this issue Jul 25, 2024 · 3 comments
Open

VSCode extension AST viewer tab not showing AST for some files. #17068

aaaayush-n opened this issue Jul 25, 2024 · 3 comments
Assignees
Labels
Go question Further information is requested

Comments

@aaaayush-n
Copy link

Description of the issue

Hello,
I am using the codeql using VSCode extension. I want to generate AST for a particular file but it just won't show me the AST.
Please note that I can view the AST for some files(majority of them) but for a few files I am unable to do so.
All these files are present in the CodeQL Database that was generated. I have verified from the src.zip file.
There is no error when I click on CODEQL: View AST button on right click in my src file in both working and non-working cases.(I've added logs at the end of this issue)
I have attached Images for the extension tab when It generates an AST and when it doesn't.

Logs for CodeQL: View AST working case:

Reading bqrs data using CodeQL CLI: bqrs decode -v --log-to-stderr --format json --entities=id,url,string --result-set nodes /var/folders/p9/gkqn3kwx2llcc6m40ky4x25c0000gn/T/queries_-97292-WeHCoy2Wtomq/contextual-query-storage/printAst.ql-nFz0NKDOSDiYpdH5Ads_w/results.bqrs...

CLI command succeeded.
Reading bqrs data using CodeQL CLI: bqrs decode -v --log-to-stderr --format json --entities=id,url,string --result-set edges /var/folders/p9/gkqn3kwx2llcc6m40ky4x25c0000gn/T/queries_-97292-WeHCoy2Wtomq/contextual-query-storage/printAst.ql-nFz0NKDOSDiYpdH5Ads_w/results.bqrs...

CLI command succeeded.
Reading bqrs data using CodeQL CLI: bqrs decode -v --log-to-stderr --format json --entities=id,url,string --result-set graphProperties /var/folders/p9/gkqn3kwx2llcc6m40ky4x25c0000gn/T/queries_-97292-WeHCoy2Wtomq/contextual-query-storage/printAst.ql-nFz0NKDOSDiYpdH5Ads_w/results.bqrs...

CLI command succeeded.

Screenshot 2024-07-25 at 11 13 15 AM

Logs for CodeQL: View AST non-working case:

Reading bqrs data using CodeQL CLI: bqrs decode -v --log-to-stderr --format json --entities=id,url,string --result-set nodes /var/folders/p9/gkqn3kwx2llcc6m40ky4x25c0000gn/T/queries_-97292-WeHCoy2Wtomq/contextual-query-storage/printAst.ql-yst2iLGzGqpy1dQl2oDU4/results.bqrs...

CLI command succeeded.
Reading bqrs data using CodeQL CLI: bqrs decode -v --log-to-stderr --format json --entities=id,url,string --result-set edges /var/folders/p9/gkqn3kwx2llcc6m40ky4x25c0000gn/T/queries_-97292-WeHCoy2Wtomq/contextual-query-storage/printAst.ql-yst2iLGzGqpy1dQl2oDU4/results.bqrs...

CLI command succeeded.
Reading bqrs data using CodeQL CLI: bqrs decode -v --log-to-stderr --format json --entities=id,url,string --result-set graphProperties /var/folders/p9/gkqn3kwx2llcc6m40ky4x25c0000gn/T/queries_-97292-WeHCoy2Wtomq/contextual-query-storage/printAst.ql-yst2iLGzGqpy1dQl2oDU4/results.bqrs...

CLI command succeeded.
Screenshot 2024-07-25 at 11 12 43 AM
@aaaayush-n aaaayush-n added the question Further information is requested label Jul 25, 2024
@mbg
Copy link
Member

mbg commented Jul 25, 2024

Hi @aaaayush-n 👋

Do you have the logs for when you created the database (i.e. ran codeql database create ...) and, if so, could you share them?

@mbg mbg self-assigned this Jul 25, 2024
@mbg mbg added the Go label Jul 25, 2024
@aaaayush-n
Copy link
Author

@mbg I do not have the logs when the database was created, It was a long while back.
Is there some other way I can help?

@mbg
Copy link
Member

mbg commented Jul 30, 2024

Some options:

  • If you are able to share the database with us, we could have a look at it to see if the cause is evident from it.
  • if not, there are some log files contained in the database that you could share with us instead.
  • You could regenerate the database and share that log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Go question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants