Unable to open file from source archive
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript, vscode
- 领域
- devtools
调研方向
首先跟踪 CodeQL VS Code 扩展从数据库的 src.zip 源代码存档中打开文件的流程,并以报告中的 codeql-zip-archive URI 和 pipes 错误作为线索。使用列出的 CodeQL CLI 命令复现数据库设置,然后验证源文件和查询结果位置都能成功打开,并且生成的 URI 不再失败。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
It is not possible to open files from the codeql source archive.
The codeql database was created locally with codeql CLI like follows:
cmake -B build -DCMAKE_VERBOSE_MAKEFILE=ON $PWD
codeql database init --overwrite --language=cpp --source-root=$PWD codeql-db
codeql database trace-command codeql-db --working-dir=$PWD/build -- make
codeql database finalize codeql-db
Then, the DB was added to the codeQL VSCode extension as "From a folder". In the codeql-db directory there is a file src.zip (seen in the screenshot). However, when I try to open a file (by clicking on it in the explorer), I've got an error message which says: "Unable to open 'example.cpp (read-only)': Unable to read file 'codeql-zip-archive://0-52/home/a.bokowy/codeql-presentation/codeql-db/src.zip/home/a.bokowy/codeql-presentation/example.cpp' (TypeError: Cannot read property 'pipes' of undefined)." The strange thing though is the 0-52 before the /home in the codeql-zip-archive URI.
It's also not possible to open the location of the query by clicking on the file name in the CodeQL Query Result explorer.
Version
Version: 1.59.0 (system setup)
Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8
Date: 2021-08-04T23:13:12.822Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT x64 10.0.19042
CodeQL extension version: 1.5.6
CodeQL CLI version: 2.7.1
Platform: linux x64
Expected behavior
Be able to open files from source archive.
Additional info
The strange thing is, that "sometimes" I am able to add database source to the explorer, so I'm able to open files, see query results and browse AST. I don't know how to reproduce the correct behavior, though. I've tried various things, like removing codeQL database from VSCode, restarting VSCode and then adding codeQL DB once more, etc. None of these attempts has resulted in successful outcome.
- 主要语言
- TypeScript
- 星标
- 539
- 派生
- 240
- 平均合并
- 2 天 6 小时
- 30 天内合并 PR
- 29
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/vscode-codeql 的其他 Issue
-
bug VSCode
难度 2/5 1-3 小时 新手友好度 68/100
github/vscode-codeql#4471 · 1 条评论 ·
-
bug enhancement VSCode
难度 2/5 1-3 小时 新手友好度 68/100
github/vscode-codeql#592 · 2 条评论 ·
-
enhancement VSCode
难度 3/5 1-2 天 新手友好度 55/100
github/vscode-codeql#4432 · 1 条评论 ·
-
bug VSCode
难度 3/5 1-2 天 新手友好度 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
难度 3/5 1-2 天 新手友好度 64/100
github/vscode-codeql#4339 · 1 条评论 ·
查看 github/vscode-codeql 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 75/100
fil-donadoni/tolaria#4409 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
corsairdev/corsair#1764 ·