Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dependencies #21

Open
PoojaDevelopler opened this issue Jun 11, 2018 · 1 comment
Open

Add dependencies #21

PoojaDevelopler opened this issue Jun 11, 2018 · 1 comment

Comments

@PoojaDevelopler
Copy link

Hi, i am trying to add MongoDB Dependencies in project , I am not sure where i am making mistake.,

i am using this `
import PackageDescription

let package = Package(
name: "SwiftBackend",
products: [
.library(name: "PerfectMongoDB", targets: ["PerfectMongoDB"])
],

dependencies: [
    // Dependencies declare other packages that this package depends on.
    .package(url: "https://github.com/PerfectlySoft/Perfect-HTTPServer.git", from: "3.0.0"),
    .package(url: "https://github.com/PerfectSideRepos/Perfect-CMongo.git", from: "0.0.0"),
    .package(url: "https://github.com/PerfectSideRepos/Perfect-CBSON.git", from: "0.0.0"),
    .package(url: "https://github.com/PerfectlySoft/PerfectLib.git", from: "3.0.0")
],
targets: [
    .target(
        name: "SwiftBackend",
        dependencies: ["PerfectHTTPServer" , "PerfectLib" , "PerfectMongoDB"]),
    ]

)
`

Please if somebody know how to configure it plz let me know

@RockfordWei
Copy link
Contributor

wrong dependencies, should look like this:

.package(url: "https://github.com/PerfectlySoft/Perfect-HTTPServer.git", from: "3.0.0"),
.package(url: "https://github.com/PerfectSideRepos/Perfect-MongoDB.git", from: "3.0.0"),
dependencies: ["PerfectHTTPServer" , "PerfectMongoDB"]),
...

also wrong library, your products should be named the same as your package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants