Make ConnectionPoolModule compatible with Android (& Windows & more?)#618
Make ConnectionPoolModule compatible with Android (& Windows & more?)#618MahdiBM wants to merge 1 commit intovapor:mainfrom
ConnectionPoolModule compatible with Android (& Windows & more?)#618Conversation
| #if canImport(Darwin) | ||
| import Darwin | ||
| #elseif os(Windows) | ||
| import ucrt |
There was a problem hiding this comment.
Notice no WinSDK import unlike in the NIOLock file. I don't think it's needed but I haven't checked in a real environment or in CI.
Right now I'm setting up Android CI in swift-dns (swift-dns/swift-dns#99).
Later when I go for Windows CI set up (swift-dns/swift-dns#96) I'll have a proper result about the Windows compatibility and I can come back with any changes that might be needed.
There was a problem hiding this comment.
The whole reason we need this is a pow call in this file.
There was a problem hiding this comment.
Ok I can confirm ucrt solves Windows' problem.
Notice no mention of pow anymore in the failures in https://github.com/swift-dns/swift-dns/actions/runs/20466245614/job/58810637612?pr=96. Last CIs were complaining about pow() on Windows before I apply this PR's changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #618 +/- ##
==========================================
- Coverage 76.40% 76.30% -0.11%
==========================================
Files 134 134
Lines 10161 10161
==========================================
- Hits 7764 7753 -11
- Misses 2397 2408 +11
🚀 New features to boost your workflow:
|
No description provided.