NativeScript / NativeScript/nativescript-cli

Fix cleanup request removal presence check logging

Open
#6,090 0 comments 0 reactions 1 assignee View on GitHub

@edusperoni is already working on this.

Since Jul 25, 2026.

Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

Summary

removeRequest in lib/detached-processes/cleanup-process.ts uses a self-comparison in its existence check:

  • The predicate compares currentRequestInfo with itself, so it evaluates to true whenever the request queue is non-empty.
  • The subsequent _.remove call already correctly compares each queued request against the supplied requestInfo.

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.tsremoveRequest

Acceptance criteria

  • removeRequest selects 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.