Skip to content

Cleanup adaptors p2#135

Merged
Aldo10012 merged 2 commits into
mainfrom
cleanup_adaptors_p2
May 11, 2026
Merged

Cleanup adaptors p2#135
Aldo10012 merged 2 commits into
mainfrom
cleanup_adaptors_p2

Conversation

@Aldo10012

@Aldo10012 Aldo10012 commented May 11, 2026

Copy link
Copy Markdown
Owner

Follow up to #134

Summary by CodeRabbit

Release Notes

  • Deprecated Features Removed

    • Removed callback-based request methods from the networking API.
    • Removed Combine Publisher support for network requests.
  • Documentation

    • Updated guides to remove callback and Publisher documentation, now focusing exclusively on async/await patterns.
  • Tests

    • Refactored test suites to reflect the removal of deprecated API patterns.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 04ecfb72-47f8-4680-85a3-65427901058d

📥 Commits

Reviewing files that changed from the base of the PR and between 4f528ce and 173d023.

📒 Files selected for processing (10)
  • Documentation/03_howToPerformARequest.md
  • Sources/EZNetworking/Core/Common/CancellableRequest.swift
  • Sources/EZNetworking/Core/Common/TaskBox.swift
  • Sources/EZNetworking/Services/Performers/Protocols/RequestPerformable.swift
  • Sources/EZNetworking/Services/Performers/RequestPerformer.swift
  • Tests/EZNetworkingTests/Core/Common/CancellableRequestTests.swift
  • Tests/EZNetworkingTests/Core/Common/TaskBoxTests.swift
  • Tests/EZNetworkingTests/Services/Performers/RequestPerformableTests.swift
  • Tests/EZNetworkingTests/Services/Performers/RequestPerformable_callbacks_Tests.swift
  • Tests/EZNetworkingTests/Services/Performers/RequestPerformable_publisher_Tests.swift
💤 Files with no reviewable changes (9)
  • Sources/EZNetworking/Core/Common/CancellableRequest.swift
  • Documentation/03_howToPerformARequest.md
  • Sources/EZNetworking/Core/Common/TaskBox.swift
  • Sources/EZNetworking/Services/Performers/RequestPerformer.swift
  • Tests/EZNetworkingTests/Core/Common/TaskBoxTests.swift
  • Tests/EZNetworkingTests/Core/Common/CancellableRequestTests.swift
  • Sources/EZNetworking/Services/Performers/Protocols/RequestPerformable.swift
  • Tests/EZNetworkingTests/Services/Performers/RequestPerformable_callbacks_Tests.swift
  • Tests/EZNetworkingTests/Services/Performers/RequestPerformable_publisher_Tests.swift

📝 Walkthrough

Walkthrough

This PR removes callback-based performTask() and Combine-based performPublisher() request APIs from EZNetworking, consolidating the library to async/await only. It deletes supporting infrastructure (CancellableRequest, TaskBox), updates the RequestPerformable protocol, removes adapter implementations, and deletes corresponding tests and documentation.

Changes

Async/Await-Only Migration

Layer / File(s) Summary
Protocol Contract
Sources/EZNetworking/Services/Performers/Protocols/RequestPerformable.swift
RequestPerformable removes performTask() callback requirement and performPublisher() publisher requirement, retaining only async/await perform(request:decodeTo:) async throws.
Supporting Infrastructure Removal
Sources/EZNetworking/Core/Common/CancellableRequest.swift, Sources/EZNetworking/Core/Common/TaskBox.swift
CancellableRequest class (with resume(), cancel(), and hasStarted state) and TaskBox thread-safe task wrapper are deleted.
RequestPerformer Adapter Removal
Sources/EZNetworking/Services/Performers/RequestPerformer.swift
Removes performTask() callback adapter, performPublisher() publisher adapter, and private createTaskAndPerform() helper.
Test Suite Removal
Tests/EZNetworkingTests/Core/Common/CancellableRequestTests.swift, Tests/EZNetworkingTests/Core/Common/TaskBoxTests.swift, Tests/EZNetworkingTests/Services/Performers/RequestPerformable_callbacks_Tests.swift, Tests/EZNetworkingTests/Services/Performers/RequestPerformable_publisher_Tests.swift, Tests/EZNetworkingTests/Services/Performers/RequestPerformableTests.swift
Deletes tests for CancellableRequest, TaskBox, callback-based performTask, and publisher-based performPublisher; renames RequestPerformableAsyncAwaitTests to RequestPerformableTests.
Documentation Update
Documentation/03_howToPerformARequest.md
Removes sections on Completion Handlers, Task Control (URLSessionTask management), and Publishers (Combine usage).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Aldo10012/EZNetworking#134: Performs the same cleanup of callback and publisher adapter implementations across the library.
  • Aldo10012/EZNetworking#128: Removes CancellableRequest and callback/publisher APIs from FileUploader and related upload-task interfaces.
  • Aldo10012/EZNetworking#127: Removes callback and publisher APIs alongside CancellableRequest, migrating to async/actor/AsyncStream interfaces.

Poem

🐰 With async/await now the only way,
callbacks and publishers fade away.
CancellableRequest takes its final bow,
TaskBox unboxed—async reigns now! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Cleanup adaptors p2' is vague and generic, using non-descriptive terms like 'Cleanup' and 'p2' that don't clearly convey what was actually removed or changed. Consider a more descriptive title that explicitly mentions the removal of callback and Combine-based APIs (e.g., 'Remove callback and Combine adapters from RequestPerformer').
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cleanup_adaptors_p2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Aldo10012
Aldo10012 merged commit 7c45cd4 into main May 11, 2026
11 checks passed
@codecov

codecov Bot commented May 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant