【问题标题】:PerfectSwift: swift package update runs endlesslyPerfectSwift:快速包更新无休止地运行
【发布时间】:2019-08-16 11:50:52
【问题描述】:

我确实有一个较旧的 Perfect Swift 项目,其中我的 package.swift 看起来如下:

// 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)

    ]
)

当我运行 swift package build 时,我得到以下输出,然后机器挂了几个小时:

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

我该怎么做才能让它再次运行? swift --version 获取

Swift version 4.2.1-dev (LLVM 4ba03d9389, Clang 78aa734eee, Swift f4134ebef6)
Target: x86_64-unknown-linux-gnu

【问题讨论】:

    标签: perfect server-side-swift


    【解决方案1】:

    改用.package(url: "package_url", from: "version")

    【讨论】:

      【解决方案2】:

      您是否尝试过更新所有内容,包括 Perfect 本身?考虑到您的旧项目是在不同版本的 Swift 下编写的,从那时起,依赖项可能发生了重大更改,并且旧版本的依赖项可能还不支持新版本。

      完成此操作后,尝试让 Perfect 重新生成 Package.swift,因为另一位用户指出语法已更改。

      【讨论】:

        猜你喜欢
        • 2011-11-08
        • 2017-01-08
        • 1970-01-01
        • 2022-10-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-06-01
        • 2019-05-27
        相关资源
        最近更新 更多