Extension does not properly start when no CodeQL CLI is found
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript, vscode
- 领域
- devtools
调研方向
从扩展启动流程、CodeQL CLI 可执行文件路径处理,以及复现步骤中描述的更新检查路径开始。使用无效的 CLI 路径和已删除下载文件夹的情况进行复现,然后检查日志以及“CodeQL: Quick query”命令的行为。完成标准是:启动时报告缺少 CLI、遵循已配置的路径,并且安装操作无需更改配置即可正常工作。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
It looks like when no CodeQL CLI is found on start up the extension does not start properly. This is noticable as:
- No "CodeQL" / "CodeQL CLI v ..." is shown in the bottom right corner
- CodeQL CLI is not downloaded automatically? See #900
- Once an extension config change is made, the extension seems to start properly, downloading CodeQL CLI; even if the config change was specifying a custom CodeQL CLI executable path
Edit: Might only occur when update check was performed recently and the following was logged:
Didn't perform CodeQL CLI update check since a check was already performed within the previous 86400 seconds.
Version
Extension:
CodeQL extension version: 1.5.1
CodeQL CLI version: 2.5.7
Platform: win32 x64
VSCode:
Version: 1.57.1 (user setup)
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:28:07.755Z
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19041
To reproduce
Prerequisites:
Extension is already installed and the default CodeQL CLI has been downloaded by the extension already.
- Open the CodeQL extension settings (
@ext:github.vscode-codeql) - Change "CodeQL > CLI: Executable Path" to an invalid path
- Restart VSCode
- Trigger loading of extensions, e.g. by clicking on CodeQL icon on the left sidebar
❌ Notice how neither an error dialog is shown, nor does the "CodeQL" info text in the bottom right corner appear.
The logs show that the extension failed finding the CodeQL CLI.
ℹ️ Only in case you had not downloaded CodeQL CLI yet and the executable path is empty it shows the error "The CodeQL CLI could not be found." - Run an extension command such as "CodeQL: Quick query"; on the error message click "Install CodeQL CLI"
❌ Nothing happens - Stop VSCode
- Open the CodeQL CLI download folder; on Windows
%appdata%\Code\User\globalStorage\github.vscode-codeql - Delete or rename the distribution folder
- Start VSCode again
- Open the CodeQL extension settings (
@ext:github.vscode-codeql) - Change "CodeQL > CLI: Executable Path" to any non-empty path
❌ Instead of checking whether the CodeQL CLI exists at the specified path, the extension starts downloading the default CodeQL CLI
Expected behavior
The extension should properly start even without CodeQL CLI; all the incorrect behavior described above (marked with ❌) should not happen.
- 主要语言
- TypeScript
- 星标
- 539
- 派生
- 240
- 平均合并
- 2 天 18 小时
- 30 天内合并 PR
- 37
贡献指南
从这里开始
- 先读完整个 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
-
blocklist removal
难度 2/5 1-3 小时 新手友好度 65/100
MetaMask/eth-phishing-detect#296544 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
pastelsky/bundlephobia#1122 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100