已开启
[bugfix][ide-plugins] #46 异常提示信息修正 #76
[bugfix][ide-plugins] #46 异常提示信息修正 #76
已开启
Qunka创建于 7 天前
Qunka成员
7 天前

提交规范 → CJMP PR 提交规范

提示:

  • 创建 PR 后,请在右侧手动 关联 Issue
  • 如需添加里程碑,请在右侧选择 Milestone
  • PR 更新后,如需触发门禁:评论 retest
  • 合入要求:至少 1 名评审人 +1 且至少 1 名测试人员 +1

问题单 PR 模板

关联信息

  • Issue:#46
  • 里程碑(可选):

问题描述(必填)

复现路径:
1.构建、创建项目、启动模拟器、调试 attach,或配置 Android/HarmonyOS/iOS 工具链时触发异常。

现象:

  • 提示内容不准确、术语混用、缺少处理建议,部分场景还会误报错误。

根因分析:

  • (为什么会这样)

解决方案(必填)

核心改动:

  • 统一并补全 adb/hdc、PID attach、模拟器、构建、项目创建、SDK 配置、OHOS 版本、iOS 依赖等提示;避免 adb fallback 成功时误报。

影响范围:

  • 仅涉及异常提示文案及对应测试断言,不改变业务流程和接口。

用户可见变更(若无则写“无”)

  • 错误信息更准确,明确失败原因、重试状态和解决方法,并提供输出面板、环境变量或安装命令指引。

自验方案(必填)

测试用例:

  • 更新 Android/HarmonyOS/iOS 调试提示断言;相关定向测试 4 项通过。TypeScript 编译、Webpack 编译通过,ESLint 无错误(保留原有 10 条 warning)。

验证环境:

  • 版本/分支/commit:main/
  • 设备与系统:Win
likedislike
CLA协议签署
当前Pull Request的提交暂无外部代码贡献者
合并受阻
QQunka成员
7 天前 关联了issue:异常提示信息排查和补全
QQunka成员
7 天前 修改了pull request 的描述
Qunka成员
7 天前 评论:

retest

likedislike
cjmp_ci成员
7 天前 评论:

门禁已触发,CI 正在排队/启动中……

likedislike
cjmp_ci成员
7 天前 评论:

@Qunka
🚦 门禁已触发
当前状态:排队/执行中
流水线地址:http://119.8.58.242:8080/blue/organizations/jenkins/IDE-Plugins%2Fpipeline-all/detail/pipeline-all/75/pipeline

如需登录 Jenkins 查看详情:

  • 账号:GitCode username
  • 初始密码:与账号相同(若已修改请使用新密码)
likedislike
Ccjmp_ci成员
7 天前 将cjmp_ci设为测试人
Ccjmp_ci成员
7 天前 重置了测试状态
cjmp_ci成员
7 天前 评论:

PR 描述不符合模板要求
请补充必填内容后重新评论 retest

PR 描述校验失败,问题如下:
[仍存在占位符]
- <issue>
likedislike
cjmp_ci成员
7 天前 评论:

@Qunka
CI 门禁失败
结果:FAILURE
流水线地址:http://119.8.58.242:8080/blue/organizations/jenkins/IDE-Plugins%2Fpipeline-all/detail/pipeline-all/75/pipeline

Jenkins 登录信息:

  • 账号:GitCode username
  • 密码:与账号相同(若已修改请使用新密码)
likedislike
QQunka成员
7 天前 修改了pull request 的描述
Qunka成员
7 天前 评论:

retest

likedislike
cjmp_ci成员
7 天前 评论:

门禁已触发,CI 正在排队/启动中……

likedislike
cjmp_ci成员
7 天前 评论:

@Qunka
🚦 门禁已触发
当前状态:排队/执行中
流水线地址:http://119.8.58.242:8080/blue/organizations/jenkins/IDE-Plugins%2Fpipeline-all/detail/pipeline-all/76/pipeline

如需登录 Jenkins 查看详情:

  • 账号:GitCode username
  • 初始密码:与账号相同(若已修改请使用新密码)
likedislike
Ccjmp_ci成员
7 天前 重置了测试状态
Ccjmp_ci成员
7 天前 通过测试
cjmp_ci成员
7 天前 评论:

@Qunka
CI 门禁通过
结果:SUCCESS
流水线地址:http://119.8.58.242:8080/blue/organizations/jenkins/IDE-Plugins%2Fpipeline-all/detail/pipeline-all/76/pipeline

Jenkins 登录信息:

  • 账号:GitCode username
  • 密码:与账号相同(若已修改请使用新密码)
likedislike
Ccjmp_ci成员
7 天前 添加了label:CI-passed
cjmp_ci成员
4 天前 评论:

retest

likedislike
cjmp_ci成员
4 天前 评论:

retest

likedislike
cjmp_ci成员
4 天前 评论:

门禁已触发,CI 正在排队/启动中……

likedislike
cjmp_ci成员
4 天前 评论:

@cjmp_ci
🚦 门禁已触发
当前状态:排队/执行中
流水线地址:http://119.8.58.242:8080/blue/organizations/jenkins/IDE-Plugins%2Fpipeline-all/detail/pipeline-all/83/pipeline

如需登录 Jenkins 查看详情:

  • 账号:GitCode username
  • 初始密码:与账号相同(若已修改请使用新密码)
likedislike
Ccjmp_ci成员
4 天前 重置了测试状态
Ccjmp_ci成员
4 天前 删除了label:CI-passed
Ccjmp_ci成员
4 天前 通过测试
cjmp_ci成员
4 天前 评论:

@cjmp_ci
CI 门禁通过
结果:SUCCESS
流水线地址:http://119.8.58.242:8080/blue/organizations/jenkins/IDE-Plugins%2Fpipeline-all/detail/pipeline-all/83/pipeline

Jenkins 登录信息:

  • 账号:GitCode username
  • 密码:与账号相同(若已修改请使用新密码)
likedislike
Ccjmp_ci成员
4 天前 添加了label:CI-passed
cjmp_ci成员
4 天前 评论:

如果你没有jenkins账号,请通过以下链接查看日志
http://119.8.58.242:8080/userContent/gate-logs/0ac5eedbf7fc4f0cae1aebaa0c19f77a.html

likedislike
guomengwei成员2 天前进行代码检视3
src/envResolver.ts
已过期
@@ -54,2 +54,3 @@
5454 if (!version) {
55- vscode.window.showErrorMessage("Failed to read version from oh-uni-package.json.");
55+ vscode.window.showErrorMessage(
56+ 'Unable to read the Cangjie SDK version. Expected a valid uni-package.json or oh-uni-package.json under the configured SDK path.',
guomengwei2 天前评论:

建议指明“无法读取 HarmonyOS 端 Cangjie SDK 版本”,并明确输出配置的路径,方便用户检查。
比如 Unable to read the Cangjie SDK version for HarmonyOS from "${sdkPath}".

likedislike
System
系统消息系统
1 天前 评论:

changed this line on fccc2e0e view diff detail

Qunka成员
1 天前 评论:

提示中增加了实际 SDK 路径

guomengwei成员2 天前进行代码检视2
src/keelsCreate.ts
@@ -205,0 +201,4 @@
201+ `Failed to create project. The keels command exited with code ${code}. ` +
202+ 'See the CJMP Output panel for details.';
203+ vscode.window.showErrorMessage(message);
204+ reject(new Error(message));
guomengwei2 天前评论:

showErrorMessage 提示错误后, reject 上层还会再次弹窗,可能导致重复提示,建议删除showErrorMessage。

likedislike
Qunka成员
1 天前 评论:

已删除

guomengwei成员1 天前进行代码检视3
src/keelsDebugConfigProvider.ts
已过期
@@ -240,2 +237,2 @@
240- `1. Add hdc to system PATH environment variable.\n` +
241- `2. Set DEVECO_SDK_HOME environment variable to your SDK root directory.`,
237+ `Could not find ${hdcExe} required for HarmonyOS debugging. ` +
238+ `Add hdc to PATH or set DEVECO_SDK_HOME to your DevEco/OpenHarmony SDK directory.`,
guomengwei1 天前评论:

“DevEco/OpenHarmony”改为“HarmonyOS”,统一术语。

likedislike
System
系统消息系统
1 天前 评论:

changed this line on fccc2e0e view diff detail

Qunka成员
1 天前 评论:

已统一

guomengwei成员1 天前进行代码检视3
src/keelsEmulators.ts
已过期
@@ -82,3 +82,3 @@
8282 resolve(parsed);
8383 } else {
84- vscode.window.showErrorMessage('Failed to get the emulator list or failed to parse the emulators.');
84+ vscode.window.showErrorMessage('Failed to retrieve or parse the emulator list.');
guomengwei1 天前评论:

模拟器列表为空不一定表示获取或解析失败,建议删除 listEmulators() 中的错误提示,由调用层根据空列表统一提示“No available emulators found”,避免重复且可能误导用户的通知。

likedislike
System
系统消息系统
1 天前 评论:

changed this line on fccc2e0e view diff detail

Qunka成员
1 天前 评论:

已删除 listEmulators() 内部的“获取或解析失败”提示

guomengwei成员1 天前进行代码检视3
src/keelsEmulators.ts
已过期
@@ -46,3 +46,3 @@
4646 await launchSelectedEmulator(selected.emulator.id);
4747 } catch (error) {
48- vscode.window.showErrorMessage(`Failed to start simulator: ${error}`);
48+ vscode.window.showErrorMessage(`Failed to start emulator: ${error}`);
guomengwei1 天前评论:

统一用simulator吧,表示“模拟器”,不用修改,上面也一样。

likedislike
System
系统消息系统
1 天前 评论:

changed this line on fccc2e0e view diff detail

Qunka成员
1 天前 评论:

已回滚

guomengwei成员1 天前进行代码检视2
src/keelsDebugConfigProvider.ts
@@ -447,3 +450,3 @@
447450 if (attemptCount < this.MAX_PID_ATTEMPTS) {
448451 vscode.window.showInformationMessage(
449- `Try to attach application. Attempt ${attemptCount} times failed, retrying...`,
452+ `Unable to find the application process. Retrying (${attemptCount + 1}/${this.MAX_PID_ATTEMPTS})...`,
guomengwei1 天前评论:

iOS 查询进程时每次重试都会弹出通知,最多连续出现 10 次,建议将重试信息输出到日志,仅在最终失败时显示一次错误提示,避免频繁弹窗影响用户体验。

likedislike
Qunka成员
1 天前 评论:

已改为console.info日志

guomengwei成员1 天前进行代码检视2
src/keelsCreate.ts
@@ -132,7 +132,7 @@
132132 if (projectName && projectTemplate) {
133133 try {
134134 await createProject(localPath, projectName, projectTemplate, logicModuleType);
135135 vscode.window.showInformationMessage(`Running "keels create ${projectName}". Please wait...`);
guomengwei1 天前评论:

工程创建完成并显示成功提示后才出现“正在创建,请稍候”,提示时序相反,把135行移到134行前面吧。

likedislike
Qunka成员
1 天前 评论:

已修改

QQunka成员
1 天前 测试状态已重置,测试人: cjmp_ci
QQunka成员
1 天前 强制推送  1 个提交:fccc2e0e-[bugfix][ide-plugins] #46 异常提示信息修正
Ccjmp_ci成员
1 天前 删除了label:CI-passed
QQunka成员
1 天前 强制推送  1 个提交:bffc47b6-[bugfix][ide-plugins] #46 异常提示信息修正
Qunka成员
1 天前 评论:

retest

likedislike
cjmp_ci成员
1 天前 评论:

门禁已触发,CI 正在排队/启动中……

likedislike
cjmp_ci成员
1 天前 评论:

@Qunka
🚦 门禁已触发
当前状态:排队/执行中
流水线地址:http://119.8.58.242:8080/blue/organizations/jenkins/IDE-Plugins%2Fpipeline-all/detail/pipeline-all/89/pipeline

如需登录 Jenkins 查看详情:

  • 账号:GitCode username
  • 初始密码:与账号相同(若已修改请使用新密码)
likedislike
Ccjmp_ci成员
1 天前 重置了测试状态
Ccjmp_ci成员
1 天前 通过测试
cjmp_ci成员
1 天前 评论:

@Qunka
CI 门禁通过
结果:SUCCESS
流水线地址:http://119.8.58.242:8080/blue/organizations/jenkins/IDE-Plugins%2Fpipeline-all/detail/pipeline-all/89/pipeline

Jenkins 登录信息:

  • 账号:GitCode username
  • 密码:与账号相同(若已修改请使用新密码)
likedislike
Ccjmp_ci成员
1 天前 添加了label:CI-passed
cjmp_ci成员
1 天前 评论:

如果你没有jenkins账号,请通过以下链接查看日志
http://119.8.58.242:8080/userContent/gate-logs/f4f90997319f4396b42bda1f789db769.html

likedislike
Gguomengwei成员
1 天前 解决了最后一个问题
Gguomengwei成员
1 天前 将Gmw2012设为评审人
Gguomengwei成员
1 天前 通过了评审