NativeScript / NativeScript/nativescript-cli
Fix cleanup request removal presence check logging
未关闭
@edusperoni 已经在做这个了。
开始于 2026年7月25日。
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 204
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 8
描述
Summary
removeRequest in lib/detached-processes/cleanup-process.ts uses a self-comparison in its existence check:
- The predicate compares
currentRequestInfowith itself, so it evaluates to true whenever the request queue is non-empty. - The subsequent
_.removecall already correctly compares each queued request against the suppliedrequestInfo.
As a result, removing a request that was never queued can log that it was removed when there are other queued requests. The request list itself is not incorrectly modified; the impact is limited to the success-versus-absent-request log branch.
Required change
Update the removeRequest existence predicate to compare currentRequestInfo with the incoming requestInfo, matching the predicate used by _.remove.
Affected area
lib/detached-processes/cleanup-process.ts—removeRequest
Acceptance criteria
removeRequestselects the successful-removal branch only when an equal queued request exists.- Removing an absent request logs the existing “cannot remove … has not been added before” message.
- Removing an existing request continues to remove it and log the existing successful-removal message.
Context
- Reported during PR #6089: https://github.com/NativeScript/nativescript-cli/pull/6089
- Original review discussion: https://github.com/NativeScript/nativescript-cli/pull/6089#discussion_r3650504137
- Requested by @edusperoni.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。