-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
When building against an Android SDK that targets API level 28 and higher, we no longer need to include the termux libandroid-spawn.so
. But now the posix_spawn*
types have a different nullability, leading to errors like this one:
/home/runner/work/swift-package-builds/swift-package-builds/swift-tools-support-core/Sources/TSCBasic/Process/Process.swift:736:50: error: value of optional type 'posix_spawn_file_actions_t?' (aka 'Optional<OpaquePointer>') must be unwrapped to a value of type 'posix_spawn_file_actions_t' (aka 'OpaquePointer')
734 | // If no redirect was requested, open the pipe for stderr.
735 | try open(pipe: &stderrPipe)
736 | posix_spawn_file_actions_adddup2(&fileActions, stderrPipe[1], 2)
| |- error: value of optional type 'posix_spawn_file_actions_t?' (aka 'Optional<OpaquePointer>') must be unwrapped to a value of type 'posix_spawn_file_actions_t' (aka 'OpaquePointer')
| `- note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
737 |
738 | // Close the other ends of the pipe since they were dupped to 2.
The nullability difference is mentioned at 52cb792. We can just update swift-tools-support-core
and other packages that use posix_spawn
to special-case Android's optionality, but is there any way that the code can support both the older 6.1 SDK and future 6.2+ SDKs with the differing nullability?
Metadata
Metadata
Assignees
Labels
No labels