Uploaded image for project: 'Swift Driver'
  1. Swift Driver
  2. SWIFT-269

Conditionally define typealiases for pointers based on version

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Swift 5.0 will be released soon, and the driver does not build in it due to a change in how libbson/libmongoc types are imported. 

      I have yet to find any documentation or a Swift evolution proposal explaining this change.

      a lot of libbson/libmongoc types that were previously non-opaque, such as bson_t structs, are now considered opaque. for example, any place we’re using an UnsafeMutablePointer<bson_t> would now become an OpaquePointer.

      we can work around this by conditionally defining typealias-es based on version and using those rather than the actual type names. 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              kaitlin.mahar Kaitlin Mahar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: