-
Notifications
You must be signed in to change notification settings - Fork 200
Adding source files to workspace fails with "couldn't obtain file explorer uri for \<dbname\>" #1020
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
Comments
Apologies for the silly question, |
Hi, yes, sorry for the unclarity. Its just some regular dbname without any surprises (like special characters) |
The "Add Database Source to Workspace" command only works on zipped source files. We should probably update the error message to make this more explicit. There are many extension features that don't work well on unzipped sources, but if you must use unzipped sources, then you can add the folder explicitly to your workspace by running Is there a reason why you are passing |
I added the --include-uncompressed-source flag to double ensure the db will include the sources. I checked the db archive and it includes both, zipped and uncompressed sources. I'll tried on a DB without this flag and it works like a charm.
Shall I close the issue, or do you want to add any further follow up tasks first? |
…1021) * Emit more relevant error message when failing to add source folder Fixes #1020 * Update changelog * Clarify changelog and error message Co-authored-by: Shati Patel <[email protected]> Co-authored-by: Shati Patel <[email protected]>
Hmmm...it should be the case that if a database has both a And, the |
Ah...there is a bug here. The source folder is indeed being given priority over the source archive. I have a simple fix, which I will put up later. Thanks for helping me dig into this. |
I have to thank for the super quick investigation and fixing =). |
Describe the bug
When trying to add sources from DB to Visual Studio workspace, the output log indicates a
"Couldn't obtain file explorer uri for <dbname>"
message, but the sources are not added to the file explorer view.
Queries work like a charm and are linked to sources that will open as expected.
The issue occurs on a bundled DB zip archive as well as on an unzipped archive that was added to VS as folder.
The db zip includes both, a src folder and an src.zip.
The dbbundle has been created using
codeql database create --language=cpp --command=make <dbname>
codeql database bundle --output=<dbname>.zip --include-uncompressed-source <dbname>
on a Linux host using codeQL CLI 2.7.0
VS Code is running on a Windows host in version 1.62.3 and CodeQL Extension 1.5.7 using CodeQL CLI 2.7.2
Version
VS Code is running on a Windows host in version 1.62.3 and CodeQL Extension 1.5.7 using CodeQL CLI 2.7.2
DB was created on a Linux host using codeQL CLI 2.7.0
To reproduce
create DB as above on linux host
copy bundled DB to analyzing windows host
start vscode-codeql-starter workspace
add database from archive (or from folder after unzipping it)
rightclick on database in codeql databases section
pick "add database source to workspace"
Expected behavior
Source files are added to workspace and are visible in file explorer
The text was updated successfully, but these errors were encountered: