I decided try out building MongoSwift using the newly released Swift 5.0 development snapshots and encountered some interesting behavior. In particular, the Swift interfaces for a number of C functions are different and there are
OpaquePointers expected in many places that expect
UnsafeMutablePointers in Swift 4.
Its C signature:
bson_t * bson_new (void);
type(of: bson_new) in Swift 4.2 gives me
() -> Optional<UnsafeMutablePointer<_bson_t>>.
But with the 5.0 snapshot, I get:
() -> Optional<OpaquePointer>
I haven't had any luck finding any discussion of these changes in Swift evolution proposals or in the forums. Does anyone have any insight into this?