1

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?

Abhinav
  • 37,684
  • 43
  • 191
  • 309

1 Answers1

0

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.

tfrank377
  • 1,858
  • 2
  • 22
  • 34
  • Thanks! I tried deleting build folder but it didn't help. When I run 'swift package update', my machine hangs. – Abhinav May 30 '17 at 15:02
  • I was able to download dependencies and compile using the` Package.swift` you posted. What version of Swift are you using? Also, have you tried deleting the `Package.pins` file and building (if using the latest Swift toolchain)? – tfrank377 May 30 '17 at 16:16
  • 1
    did you ever figure this out? i started having this problem with swift 4.2.1 and have tried deleting Package.resolved and .build – tettoffensive Feb 26 '19 at 01:30