Swift Package Manager Not able to resolve Kitura version above 1.4

591 Views Asked by At

I am trying with a sample Swift on server (using Kitura) app and using swift package manager to resolve the dependencies.

Here is my sample Package.swift file.

import PackageDescription

let package = Package(
    name: "Kitura_Swift_Server",
    dependencies: [
        .Package(url: "https://github.com/IBM-Swift/Kitura.git", majorVersion: 1, minor: 4)
    ])

My problem is if I change the minor version of Kitura framework to anything above 4, I get the error error: unsatisfiable. Although 1.7.1 is the latest Kitura version but swift build is not resolving it.

Anyone have any idea why it could behave so?

1

There are 1 best solutions below

3
On

I've seen this issue before when you've already run swift build and the .build directory is created, then you change something in your Package.swift. That said, I've had no issue using Kitura 1.7.x as my lone dependency.

I recommend you change your Kitura version to 1.7.x and run swift package update (in Swift 3.1.1) if you want your dependencies updated.

If that doesn't work, it doesn't hurt to start fresh and delete the .build directory, then run swift build.