Automattic / Automattic/wordpress-rs
`cancelRequest(withId:)` is entirely compiled out where Combine is unavailable
- Dominant language
- Rust
- Stars
- 36
- Forks
- 5
- Avg merge
- 17h 30m
- Merged PRs (30d)
- 43
Description
> Split out from Automattic/wordpress-rs#1497 — *Swift executor URLSession error audit*. Section E — Cancellation gaps.
>
> File references are to `native/swift/Sources/wordpress-api/SafeRequestExecutor.swift` unless noted; `:NNN` line numbers were verified against `fix/converge-executor-error-classification`.
**Severity: low.** The whole body sits inside `#if canImport(Combine)` (`:152`), including the `session.allTasks` lookup and `task?.cancel()` that need no Combine — only the notification fallback does. On Linux, `cancel(context:)` therefore cancels nothing, ever, and cancellation never produces `CancellationError`. Scope the `#if` to just the publisher fallback.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in native/swift/Sources/wordpress-api/SafeRequestExecutor.swift around line 152 and trace cancelRequest(withId:) and cancel(context:), including the session.allTasks lookup and task cancellation. Verify the Linux/non-Combine build, and consider the issue done when cancellation still runs without Combine and produces CancellationError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100