Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EMBR-5972] Removed DispatchQueue Extension (to confrom to DispatchableQueue) #150

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

ArielDemarco
Copy link
Collaborator

Overview

When we make DispatchQueue conform to the DispatchableQueue protocol, it sometimes leads to collisions that the compiler cannot resolve unless the client imports Embrace. This is undoubtedly not only unnecessary but also unexpected.

This PR addresses the issue by removing that extension, meaning DispatchQueue no longer conforms to DispatchableQueue.

To maintain the flexibility of DispatchableQueue, a wrapper for DispatchQueue was created: DefaultDispatchableQueue, which does conform to DispatchableQueue. Additionally, convenience methods were added to simplify the creation of these queues.

@ArielDemarco ArielDemarco requested a review from a team as a code owner December 13, 2024 13:09
Copy link

Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Copy link

Warnings
⚠️ No CHANGELOG entry added.
⚠️ No tests added / modified.
⚠️

Sources/EmbraceCommonInternal/Protocols/DispatchableQueue.swift#L26 - Lines should not have trailing whitespace (trailing_whitespace)

⚠️

Sources/EmbraceCore/Capture/Network/URLSessionTaskHandler.swift#L227 - where clauses are preferred over a single if inside a for (for_where)

Generated by 🚫 Danger Swift against a4011e8

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 90.57%. Comparing base (69ed424) to head (a4011e8).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ceCommonInternal/Protocols/DispatchableQueue.swift 76.92% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #150      +/-   ##
==========================================
- Coverage   90.61%   90.57%   -0.05%     
==========================================
  Files         419      419              
  Lines       28090    28102      +12     
==========================================
- Hits        25455    25453       -2     
- Misses       2635     2649      +14     
Files with missing lines Coverage Δ
Sources/EmbraceConfigInternal/EmbraceConfig.swift 93.84% <ø> (ø)
...ceCore/Capture/Network/URLSessionTaskHandler.swift 97.40% <100.00%> (ø)
...Core/Capture/UX/View/UIViewControllerHandler.swift 96.80% <100.00%> (ø)
Sources/EmbraceCrash/EmbraceCrashReporter.swift 87.17% <ø> (ø)
...ceCommonInternal/Protocols/DispatchableQueue.swift 80.00% <76.92%> (-20.00%) ⬇️

... and 2 files with indirect coverage changes

@ArielDemarco ArielDemarco merged commit 751f798 into main Dec 18, 2024
10 checks passed
@ArielDemarco ArielDemarco deleted the fix-dispatchableQueue-and-dispatchQueue branch December 18, 2024 20:32
@ArielDemarco ArielDemarco restored the fix-dispatchableQueue-and-dispatchQueue branch December 18, 2024 20:32
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.

2 participants