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

Missing required modules: 'bson', 'mongoc'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: 0.0.9
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      macOS Mojave latest, Xcode 10.2 in Swft 4.2.3 toolchain mode

      Description

      I've put the mong-swift-driver in a library and import in other libraries and executables. Wherever I've included I'm getting error "Missing required modules: 'bson', 'mongoc'" while building the other things.

      I've tried two types of Package.swift configurations, but not working! Show below part of that swift file.

      1)
      dependencies: [
      // Dependencies declare other packages that this package depends on.
      // .package(url: /* package url */, from: "1.0.0"),
      .package(url: "https://github.com/mongodb/swift-bson", from: "2.0.0"),
      .package(url: "https://github.com/mongodb/swift-mongoc", from: "2.0.0"),
      .package(url: "https://github.com/mongodb/mongo-swift-driver", from: "0.0.9")
      ],
      targets: [
      // Targets are the basic building blocks of a package. A target can define a module or a test suite.
      // Targets can depend on other targets in this package, and on products in packages which this package depends on.
      .target(
      name: "Project",
      dependencies: ["mongoc", "bson", "MongoSwift"]),
      .testTarget(
      name: "ProjectTests",
      dependencies: ["Project"]),
      ]

      2) dependencies: [
      // Dependencies declare other packages that this package depends on.
      // .package(url: /* package url */, from: "1.0.0"),
      .package(url: "https://github.com/mongodb/mongo-swift-driver", from: "0.0.9")
      ],
      targets: [
      // Targets are the basic building blocks of a package. A target can define a module or a test suite.
      // Targets can depend on other targets in this package, and on products in packages which this package depends on.
      .target(
      name: "Project",
      dependencies: ["MongoSwift"]),
      .testTarget(
      name: "ProjectTests",
      dependencies: ["Project"]),
      ]

        Attachments

          Activity

            People

            Assignee:
            matt.broadstone Matt Broadstone
            Reporter:
            kumar.muthaiah@yahoo.com Kumar Muthaiah
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: