-
Notifications
You must be signed in to change notification settings - Fork 190
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
AST Viewing unable to use extracted database bundle's src.zip #699
Comments
I also downgraded VS Code, same issue.
|
Thanks for reporting. It's certainly possible that #621 is related. Are you able to work around this by unzip manually and importing the folder? Also, would you be willing to share the database, so I can try this? |
Unzipping and importing the folder works, but it's a bit of a bummer that viewing the AST only works if it's a zip file. It's a relatively big database at almost 20GB, might not be the easiest to share. |
The AST viewer only requires the src.zip. The rest of the database can be unzipped. Is this not what you are seeing? |
That's correct, the AST viewer doesn't work with my unzipped database bundle folder (which has the required I believe it's because when I open a folder, vscode-codeql/extensions/ql-vscode/src/contextual/templateProvider.ts Lines 146 to 148 in fe1476f
|
That's surprising to me. Internally, the extension using
Notice the Anyway, I think I know a fix for the problem of downloading and installing large databases and I will work on it today. The problem is that the extension downloads and unzips in a single stream without saving the original zip file to disk. This saves time and disk space. However, if the zip is too large, or if the zip central directory is incorrect, then this approach may not work. See ZJONSSON/node-unzipper#149 also, #622. The solution is to first save to disk, and then unzip from disk using a slightly different API. I don't know if this will solve the problem you are having, but it seems likely it is related. |
Odd, mine looks like that already. {
"folders": [
{
"path": "src"
},
{
"path": "../../codeql"
},
{
"name": "[codeql source archive]",
"uri": "codeql-zip-archive://0-45/mnt/space/mono/master/src/codeql/src.zip"
}
]
} I think I should rename this ticket to just handle the current AST Viewer issue, and stick to #622 for the large unzipping issues that you're already working on. Thanks for the fast responses! |
Hmmm...I see that this is on a mounted drive. Is it over the network? I wonder if that is related. More precisely, what filesystem is that mount using? |
Er so My |
PR for unzipping issue is #700. |
The only way that you can receive that error for the AST viewer is if you are trying to view a file that is not from a codeql source archive. The extension determines which file to parse by looking at the active editor (or the selected file if invoking from the file explorer). I can see two possibilities:
Make sure that your editor is opening a file from the zip archive using the extension's support for zipped archives. If this doesn't help, then I am truly befuddled and will need some more information. |
You're right, it was another extension! I believe it was ccls. |
That's good to know. I'll try installing the other extension and see if there is a way to get both to work. |
Bit off-topic, but is it possible to calculate the AST from the codeql CLI? It's pretty slow on my laptop. |
Somewhat related, I opened a ticket regarding using ccls with CodeQL. MaskRay/ccls#776 |
Describe the bug
When I try to open a large database.zip bundle, I get:
Full log:
Additional context
The text was updated successfully, but these errors were encountered: