1

I do have an older Perfect Swift project where my package.swift looks the following:

// Generated automatically by Perfect Assistant Application
// Date: 2017-09-24 18:44:24 +0000
import PackageDescription
let package = Package(
    name: "SomeName",
    targets: [],
    dependencies: [
               .Package(url: "https://github.com/PerfectlySoft/Perfect-HTTPServer.git", majorVersion: 2),
               .Package(url: "https://github.com/PerfectlySoft/Perfect-LocalAuthentication-MySQL.git", majorVersion: 1),
               .Package(url: "https://github.com/PerfectlySoft/Perfect-CURL.git", majorVersion: 2),
               .Package(url: "https://github.com/SwiftORM/StORM.git", majorVersion: 3),
               .Package(url: "https://github.com/PerfectlySoft/Perfect-MySQL.git", majorVersion: 3),
               .Package(url: "https://github.com/PerfectlySoft/Perfect-SMTP.git", majorVersion: 1),
               .Package(url: "https://github.com/PerfectlySoft/Perfect-RequestLogger.git", majorVersion: 1)

    ]
)

when I run swift package build I get the following output and then the machine hangs for hours:

Updating https://github.com/PerfectlySoft/Perfect-HTTPServer.git
Updating https://github.com/PerfectlySoft/Perfect-LocalAuthentication-MySQL.git
Updating https://github.com/PerfectlySoft/Perfect-CURL.git
Updating https://github.com/PerfectlySoft/Perfect-RequestLogger.git
Updating https://github.com/SwiftORM/StORM.git
Updating https://github.com/PerfectlySoft/Perfect-MySQL.git
Updating https://github.com/PerfectlySoft/Perfect-SMTP.git
Updating https://github.com/PerfectlySoft/Perfect-Net.git
Updating https://github.com/PerfectlySoft/Perfect-HTTP.git
Updating https://github.com/PerfectlySoft/Perfect-Thread.git
Updating https://github.com/PerfectlySoft/Perfect-LinuxBridge.git
Updating https://github.com/PerfectlySoft/Perfect-Crypto.git
Updating https://github.com/PerfectlySoft/PerfectLib.git
Updating https://github.com/PerfectlySoft/Perfect-COpenSSL-Linux.git
Updating https://github.com/SwiftORM/MySQL-StORM.git
Updating https://github.com/PerfectlySoft/Perfect-Mustache.git
Updating https://github.com/iamjono/JSONConfig.git
Updating https://github.com/PerfectlySoft/Perfect-Session-MySQL.git
Updating https://github.com/iamjono/SwiftRandom.git
Updating https://github.com/PerfectlySoft/Perfect-Logger.git
Updating https://github.com/iamjono/SwiftMoment.git
Updating https://github.com/PerfectlySoft/Perfect-libcurl.git

What can I do to make this run again? swift --version gets

Swift version 4.2.1-dev (LLVM 4ba03d9389, Clang 78aa734eee, Swift f4134ebef6)
Target: x86_64-unknown-linux-gnu
swalkner
  • 16,679
  • 31
  • 123
  • 210

2 Answers2

0

Try .package(url: "package_url", from: "version") instead.

NFDev
  • 68
  • 8
0

Have you tried updating everything, including Perfect itself? Consider that your older project was written under a different version of Swift, the dependencies may have had breaking changes since then, and the older version of the dependencies probably didn't support the new version yet.

After doing this, try getting Perfect to regenerate the Package.swift, since another user pointed out that syntax has changed.