已合并
[feature][ide-plugins] #80 新增 clean 子命令 #78
[feature][ide-plugins] #80 新增 clean 子命令 #78
已合并
Qunka创建于 5 天前
Qunka成员
5 天前

特性 PR 模板

关联信息

  • Issue:#80
  • 里程碑(可选):
  • 关联模块/目录:

详细描述(必填)

功能目标:

  • 新增clean子命令进入CJMP插件,利用Open Quick Access操作。

技术方案:

  1. 支持 All Platforms / Android / HarmonyOS / iOS,默认选中 All Platforms,选择具体平台后,All Platforms 灰显且不可选。
  2. -v 默认启用
  3. 支持普通清理、深度清理、包含测试结果清理及其组合
  4. 使用插件所选择的 SDK 及对应 CJMP_SDK_HOME
  5. Clean 只出现在 CJMP 工程的命令面板中

关联模块:

  • 选择平台、清理模式并确认:src\keelsClean.ts
  • 注册 cjmp.clean:package.json
  • 注册命令处理函数:src/extension.ts
  • 回归测试:test/integration/keelsClean.test.tstest/integration/extension-manifest.test.ts

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

  • CJMP Clean

自验方案(必填)

性能指标(涉及性能改动必填):

  • 不涉及性能改动。

测试用例:

  • npm run compile-tests:通过。
  • npm run lint:0 个错误,10 条已有 warning。
  • npm run compile:通过。

验证环境:

  • 版本/分支/commit:main/feature_clean/3859d2e
  • 设备与系统:Win
likedislike
Pull Request已成功合入, 合并人@Axing_huawei
(感谢 Qunka 的贡献)
QQunka成员
5 天前 关联了issue:[enhancement] 新增 clean 子命令交互
QQunka成员
5 天前 修改了pull request 的描述
QQunka成员
5 天前 修改了pull request 的描述
Qunka成员
5 天前 评论:

retest

likedislike
cjmp_ci成员
5 天前 评论:

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

likedislike
cjmp_ci成员
5 天前 评论:

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

如需登录 Jenkins 查看详情:

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

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

Jenkins 登录信息:

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

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

likedislike
guomengwei成员5 天前进行代码检视2
src/keelsClean.ts
@@ -0,0 +295,4 @@
295+ platforms.map((platform) => platform.value),
296+ mode.value,
297+ );
298+ const outputChannel = dependencies.createOutputChannel();
guomengwei5 天前评论:

每次执行 Clean 都会创建一个新的 CJMP Clean 输出通道,但通道既未复用、也未注册到 context.subscriptions 或显式释放。建议复用已有的CJMP通道。

likedislike
Qunka成员
5 天前 评论:

按建议,已提取 keelsClean 与 keelsRun 通道复用。

QQunka成员
5 天前 测试状态已重置,测试人: cjmp_ci
QQunka成员
5 天前 推送  1 个提交:2bec7a5e-[fix][ide-plugins] 修复 Clean 输出通道生命周期
Ccjmp_ci成员
5 天前 删除了label:CI-passed
QQunka成员
5 天前 强制推送  1 个提交:60eeea45-[feature][ide-plugins] #80 新增 clean 子命令
Qunka成员
5 天前 评论:

retest

likedislike
cjmp_ci成员
5 天前 评论:

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

likedislike
cjmp_ci成员
5 天前 评论:

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

如需登录 Jenkins 查看详情:

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

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

Jenkins 登录信息:

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

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

likedislike
guomengwei成员4 天前进行代码检视3
src/keelsClean.ts
已过期
@@ -0,0 +258,4 @@
258+export async function cleanCjmpProject(
259+ dependencies: CleanDependencies = defaultCleanDependencies,
260+): Promise<void> {
261+ const workspaceRoot = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath;
guomengwei4 天前评论:

这里可以直接调getCjmpProjectWorkspaceFolder,判断是否为cjmp工程

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

changed this line on 19894bfb view diff detail

Qunka成员
4 天前 评论:

已复用现有getCjmpProjectWorkspaceFolder函数

Rrenyufei成员
4 天前 将renyufei设为评审人
Rrenyufei成员
4 天前 通过了评审
guomengwei成员4 天前进行代码检视3
src/keelsClean.ts
已过期
@@ -0,0 +297,4 @@
297+ mode.value,
298+ );
299+ const outputChannel = dependencies.createOutputChannel();
300+ outputChannel.clear();
guomengwei4 天前评论:

因为 Clean 和调试共用 CJMP 通道时,Clean 会清掉已有调试日志。建议改为追加分隔标题。
outputChannel.appendLine('');
outputChannel.appendLine('=== CJMP Clean ===');

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

changed this line on 19894bfb view diff detail

Qunka成员
4 天前 评论:

已按建议不再直接outputChannel.clear();而是appendLine追加分隔符。

guomengwei成员4 天前进行代码检视2
src/extension.ts
@@ -66,2 +68,4 @@
6668 });
6769 
70+ const cleanCommand = vscode.commands.registerCommand('cjmp.clean', async () => {
71+ const isSdkReady = await executeSDK(context);
guomengwei4 天前评论:

clean不支持logic-module,所以插件里也要加一下限制。可以在这个之前判断一下,如果是logic-module给出不支持提示,并退出。

likedislike
Qunka成员
4 天前 评论:

已在async function cleanCjmpProject中显式拒绝logic-module工程类型。

QQunka成员
4 天前 评审状态已重置,评审人: renyufei
QQunka成员
4 天前 测试状态已重置,测试人: cjmp_ci
QQunka成员
4 天前 强制推送  1 个提交:19894bfb-[feature][ide-plugins] #80 新增 clean 子命令
Ccjmp_ci成员
4 天前 删除了label:CI-passed
Qunka成员
4 天前 评论:

retest

likedislike
cjmp_ci成员
4 天前 评论:

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

likedislike
cjmp_ci成员
4 天前 评论:

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

如需登录 Jenkins 查看详情:

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

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

Jenkins 登录信息:

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

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

likedislike
Gguomengwei成员
4 天前 解决了最后一个问题
此处折叠了6条事件消息 查看更多
Ccjmp_ci成员
3 天前 添加了label:reviewed