Closed compnerd closed 4 days ago
@swift-ci please test
Looks like it introduces some issues for Linux?
/build/swift-foundation/Sources/FoundationEssentials/FileManager/FileOperations+Enumeration.swift:308:51: error: value of optional type 'UnsafeMutablePointer<CChar>?' (aka 'Optional<UnsafeMutablePointer<Int8>>') must be unwrapped to a value of type 'UnsafeMutablePointer<CChar>' (aka 'UnsafeMutablePointer<Int8>')
@swift-ci please test
@swift-ci please test
@parkera yeah, I didn't have a Linux machine handy - turns out that the nullability differences are in the FTS parameter not the structure! Trying to clean up the behavioural differences :(
@swift-ci please test
@swift-ci please test
@swift-ci please test
@parkera @jmschonfeld - okay, I expect this to pass the CI now, but this will not build for Android. I've dug through the issue and it appears to be a bug in Bionic. The declaration that they have in the Bionic header is misattributed with incorrect nullability. I am going to see if I can adjust this via APINotes, failing that, we might have to do some shims for fts_open
.
@swift-ci please test
@parkera @jmschonfeld - can we get this merged? The remaining failure requires an updated toolchain to build (I just merged the necessary changes into the compiler).
This adjusts the API usage to account for differences on Android. The biggest source of difference is the nullability, particularly in the
fts
APIs. Unfortunately,MMAP_FAILED
is not imported by the clang importer due to the casting involved so we manually inline the constant at the single site.