NIOIMAPCore: import the Android overlay module instead of Bionic#829
NIOIMAPCore: import the Android overlay module instead of Bionic#829odrobnik wants to merge 1 commit into
Conversation
|
Android build verification (isolated |
|
@Lukasa @danieleggert sorry guys for another such PR. Bionic is actually a sub-set of Android so it is preferred nowadays to use Android instead. This PR rectifies the mistake I made in the PR #826 which you had already merged. |
|
@odrobnik There’s a CI runner for Android now. If you fix the format failures and push those, we can re-run the PR checks. |
apple#826 added a `canImport(Bionic)` / `import Bionic` arm to NIOIMAPCore's per-file libc-import guards. Switch it to the `Android` umbrella module, which re-exports Bionic plus the Swift overlay, so the import is the more complete/idiomatic libc surface on the Swift Android SDK. No functional change — both resolve the libc symbols (isalnum/isalpha) used here.
85b8e7e to
bdb0c5c
Compare
|
@danieleggert thanks! Rebased onto One note on the format check: it wasn't actually a swift-format violation. Every |
Motivation
#826 added a
canImport(Bionic)/import Bionicarm to NIOIMAPCore's per-file libc-import guards so the module builds for Android. This follow-up switches that arm to theAndroidumbrella module.On the Swift Android SDK,
Androidre-exportsBionicand layers the Swift overlay on top, so it's the more complete/idiomatic libc surface to import.Bionicis effectively a subset.Modifications
In the 17 NIOIMAPCore files that gained a Bionic arm, replace
canImport(Bionic)/import Bionic(and theimport func Bionic.isalnum/isalphainUInt8+ParseTypeMembership.swift) with theAndroidequivalents.Result
No functional change — both modules resolve the libc symbols used here (
isalnum/isalpha); NIOIMAPCore still builds for Android. Verified the whole module cross-compiles for Android withimport Android(swift build --target NIOIMAPCorevia skiptools/swift-android-action).(Note:
swift-nioitself currently usescanImport(Bionic); happy to close this if you'd rather keepnio-imapconsistent with that — but flagging thatAndroidis the fuller overlay.)