Use FoundationEssentials in CancellableQueue when available#76
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #76 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 1301 1301
=========================================
Hits 1301 1301
🚀 New features to boost your workflow:
|
dfed
approved these changes
Jun 9, 2026
dfed
left a comment
Owner
There was a problem hiding this comment.
Thank you for the contribution! One nit before I merge assuming CI passes.
051a7c6 to
13beb97
Compare
don't import Foundation if FoundationEssentials available; conditionally and explicitly import Dispatch
13beb97 to
84cea56
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
CancellableQueue.swiftis the only file inAsyncQueuethat does a plainimport Foundation. On Linux that single import pullslibFoundation.so→libFoundationInternationalization.so→_FoundationICUinto the linked binary via the autolink directive — even though the file only usesUUIDandDispatchQueue, and no ICU/internationalization functionality is ever called.For size-constrained / embedded Linux targets this drags in the entire ICU data blob (tens of MB of flash) and the Foundation internationalization library for no functional benefit.
Change
UUIDis provided byFoundationEssentials.DispatchQueuecomes fromDispatch(already imported directly inUtilities/Delivery.swift, so this matches existing style in the package).FoundationEssentialsfall back to fullFoundationexactly as before — no behavior change.No public API change;
CancellableQueuebehaves identically. This just lets it link without full Foundation/ICU whereFoundationEssentialsexists.🤖 Generated with Claude Code