Skip to content

don't require Foundation to build FlyingSocks#188

Merged
swhitty merged 1 commit intoswhitty:mainfrom
PADL:foundation-essentials
Feb 27, 2026
Merged

don't require Foundation to build FlyingSocks#188
swhitty merged 1 commit intoswhitty:mainfrom
PADL:foundation-essentials

Conversation

@lhoward
Copy link
Contributor

@lhoward lhoward commented Feb 26, 2026

For embedded Linux systems, it's ideal to build FlyingSocks without the Foundation dependency (i.e. just with FoundationEssentials, as it doesn't pull in ICU). This requires conditional imports and moving some files around.

@lhoward lhoward marked this pull request as draft February 26, 2026 10:33
@lhoward
Copy link
Contributor Author

lhoward commented Feb 26, 2026

Leaving as a draft as tests aren't passing.

✘ Test directoryHandler_ReturnsSubDirectoryFile() recorded an issue at DirectoryHTTPHandlerTests.swift:68:9: Expectation failed: (response.statusCode → HTTPStatusCode(code: 404, phrase: "Not Found")) == (.ok → HTTPStatusCode(code: 200, phrase: "OK"))
✘ Test directoryHandler_ReturnsSubDirectoryFile() recorded an issue at DirectoryHTTPHandlerTests.swift:69:9: Expectation failed: (response.headers[.contentType] → nil) == "application/json"
✘ Test directoryHandler_ReturnsSubDirectoryFile() recorded an issue at DirectoryHTTPHandlerTests.swift:70:9: Expectation failed: try await response.bodyString == #"{"type": "malt"}"#
✘ Test directoryHandler_ReturnsFile() recorded an issue at DirectoryHTTPHandlerTests.swift:43:9: Expectation failed: (response.statusCode → HTTPStatusCode(code: 404, phrase: "Not Found")) == (.ok → HTTPStatusCode(code: 200, phrase: "OK"))
✘ Test directoryHandler_ReturnsFile() recorded an issue at DirectoryHTTPHandlerTests.swift:44:9: Expectation failed: (response.headers[.contentType] → nil) == "application/json"
✘ Test directoryHandler_ReturnsFile() recorded an issue at DirectoryHTTPHandlerTests.swift:45:9: Expectation failed: try await response.bodyString == #"{"fish": "cakes"}"#
✘ Suite DirectoryHTTPHandlerTests failed after 0.013 seconds with 6 issues.
✘ Test run with 380 tests in 45 suites failed after 1.131 seconds with 6 issues.

For embedded Linux systems, it's ideal to build FlyingSocks without the
Foundation dependency (i.e. just with FoundationEssentials, as it doesn't pull
in ICU). This requires conditional imports and moving some files around.
@lhoward lhoward force-pushed the foundation-essentials branch from ae31e62 to 7d597c9 Compare February 27, 2026 00:39
@lhoward lhoward marked this pull request as ready for review February 27, 2026 00:39
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.80%. Comparing base (5aac1b7) to head (7d597c9).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
FlyingSocks/Sources/SocketPool.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #188   +/-   ##
=======================================
  Coverage   92.80%   92.80%           
=======================================
  Files          68       68           
  Lines        3448     3448           
=======================================
  Hits         3200     3200           
  Misses        248      248           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@swhitty swhitty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great this has been on my list for while, thank you Luke 👌

@swhitty swhitty merged commit a8358d1 into swhitty:main Feb 27, 2026
12 of 13 checks passed
@lhoward lhoward deleted the foundation-essentials branch February 28, 2026 02:19
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