Skip to content

Conversation

@swhitty
Copy link
Owner

@swhitty swhitty commented Jan 11, 2026

Remove SocketAddress.make(from:) from protocol and instead place the methods on the 3 address types;

  • sockaddr_in
  • sockaddr_in6
  • sockaddr_un

Other conformers cannot be converted from sockaddr_storage using the current methods so it makes sense to have the compiler enforce this.

Updates sockaddr_strorage.withSockAddr { } to pass the underlying address size, not the storage size.

@codecov
Copy link

codecov bot commented Jan 11, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.57%. Comparing base (f9d9a18) to head (fc1160d).
⚠️ Report is 3 commits behind head on swift5.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
FlyingSocks/Sources/SocketAddress.swift 50.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           swift5     #185      +/-   ##
==========================================
- Coverage   92.80%   92.57%   -0.24%     
==========================================
  Files          69       69              
  Lines        3446     3460      +14     
==========================================
+ Hits         3198     3203       +5     
- Misses        248      257       +9     

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

@swhitty swhitty mentioned this pull request Jan 11, 2026
@swhitty swhitty merged commit 9b5673d into swift5 Jan 11, 2026
22 of 26 checks passed
@swhitty swhitty deleted the tighten-SocketAddress.make branch January 11, 2026 22:35
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