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

Driver doesn't build in Swift 4.2

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 0.0.6
    • None
    • None

    Description

      On OSX 10.14, the driver will not build in Swift 4.2 with the following error output. Per users on this GitHub issue, this is also an issue on Ubuntu and seems to be a Swift 4.2 issue rather than anything platform specific.

      I'm guessing it's something to do with how C names are getting imported to Swift but needs further investigation.

      Note that we can ignore the weirdness about the version string, that is the usual strange error you get when there is a different libmongoc/libbson related error, which always disappears once you fix the actual error. Though I would like to get to the bottom of why that happens someday.

      usr/local/include/libbson-1.0/bson/bson-version.h:63:27: error: invalid suffix '.1' on floating constant
      #define BSON_VERSION (1.13.1-dev)
                                ^
      /Users/kaitlinmahar/mongo-swift-driver/Sources/MongoSwift/BSON/BSONValue.swift:468:41: error: use of unresolved identifier 'BSON_TYPE_CODE'
              if iter.currentType.rawValue == BSON_TYPE_CODE.rawValue {
                                              ^~~~~~~~~~~~~~
      Darwin.ACL_TYPE_CODA:1:12: note: did you mean 'ACL_TYPE_CODA'?
      public var ACL_TYPE_CODA: acl_type_t { get }
                 ^
      bson.BSON_BYTE_ORDER:1:12: note: did you mean 'BSON_BYTE_ORDER'?
      public var BSON_BYTE_ORDER: Int32 { get }
                 ^
      

       

      Attachments

        Activity

          People

            kaitlin.mahar@mongodb.com Kaitlin Mahar
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: