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

SwiftPM cannot resolve #59

Closed
kimsanov opened this issue Sep 2, 2019 · 5 comments
Closed

SwiftPM cannot resolve #59

kimsanov opened this issue Sep 2, 2019 · 5 comments

Comments

@kimsanov
Copy link

kimsanov commented Sep 2, 2019

Xcode 11 Beta 6. When adding package gives error:

The package dependency graph can not be resolved, possibly because of these requirements:
https://github.com/vapor-community/mongo-driver — 2.3.1..<3.0.0

@vzsg
Copy link
Member

vzsg commented Sep 3, 2019

Can you share your whole Package.swift file?

@kimsanov
Copy link
Author

kimsanov commented Sep 3, 2019

My current Package is

// swift-tools-version:4.0
import PackageDescription


let package = Package(
    name: "Kimsapp-Stats",
    dependencies: [
        // 💧 A server-side Swift web framework.
        .package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
        // 🍃 An expressive, performant, and extensible templating language built for Swift.
        .package(url: "https://github.com/vapor/leaf.git", from: "3.0.0"),
        .package(url: "https://github.com/vapor/fluent-postgresql.git", from: "1.0.0-rc")
    ],
    targets: [
        .target(name: "App", dependencies: ["Leaf", "Vapor", "FluentPostgreSQL"]),
        .target(name: "Run", dependencies: ["App"]),
        .testTarget(name: "AppTests", dependencies: ["App"])
    ]
)

But I've also tried with new vapor project from web template. Result is the same. Here is Package.swift for empty project

// swift-tools-version:4.0
import PackageDescription

let package = Package(
    name: "TestMongo",
    dependencies: [
        // 💧 A server-side Swift web framework.
        .package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),

        // 🍃 An expressive, performant, and extensible templating language built for Swift.
        .package(url: "https://github.com/vapor/leaf.git", from: "3.0.0"),
    ],
    targets: [
        .target(name: "App", dependencies: ["Leaf", "Vapor"]),
        .target(name: "Run", dependencies: ["App"]),
        .testTarget(name: "AppTests", dependencies: ["App"])
    ]
)

Here is screenshot how error looks
Screenshot 2019-09-03 at 14 09 13

@kimsanov
Copy link
Author

kimsanov commented Sep 3, 2019

@vzsg
Copy link
Member

vzsg commented Sep 3, 2019

The problem is that this package is only compatible with Vapor 2, and you're trying to add it to a Vapor 3 project. There's no workaround, you will have to ignore this package and use MongoKitten 5 directly.

@kimsanov
Copy link
Author

kimsanov commented Sep 3, 2019

Got it. Thanks!

@kimsanov kimsanov closed this as completed Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants