【问题标题】:LingoVapor package from Vapor 3 to Vapor 4从 Vapor 3 到 Vapor 4 的 LingoVapor 包
【发布时间】:2020-07-13 08:58:09
【问题描述】:

我是 swift 新手。另外,还有一个带有vapor 3的项目。现在我们应该将它升级到新版本。 我对从“Vapor 3”到“Vapor 4”的 LingoVapor 包有疑问:

我按照说明更改“Package.swift”中的以下行:

   dependencies: [
        // ???? A server-side Swift web framework.
        .package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"),
        .package(url: "https://github.com/vapor/fluent.git", from: "4.0.0-rc"),
        .package(url: "https://github.com/vapor/leaf.git", from: "3.0.0"),
        .package(url: "https://github.com/vapor-community/wkhtmltopdf.git", from: "3.0.0"),
        .package(url: "https://github.com/vapor-community/lingo-vapor.git", from: "3.0.0"),
        .package(url: "https://github.com/skelpo/CSV.git", from: "1.0.0")
    ],
    targets: [
        .target(
            name: "App",
            dependencies: [
                .product(name: "Fluent", package: "fluent"),
                .product(name: "Vapor", package: "vapor"),
                .product(name: "Leaf", package: "leaf"),
                .product(name:  "wkhtmltopdf", package: "wkhtmltopdf"),
                .product(name: "LongoVapor", package: "lingo-vapor"),
                .product(name:  "CSV", package: "CSV")
            ],

当我推送“重置包缓存”时,我收到以下错误:

Resaving package dependencies
    because lingo-vapor >=3.0.0 depends on vapor 3.0.0..<4.0.0 and root depends on vapor 4.0.0..<5.0.0, lingo-vapor >=3.0.0 is forbidden.
    And because root depends on lingo-vapor 3.0.0..<4.0.0, version solving failed.

有什么办法吗?

【问题讨论】:

标签: swift package upgrade vapor


【解决方案1】:

我已经创建了 LingoVapor 包的 Vapor 4 版本并创建了一个 PR,https://github.com/vapor-community/Lingo-Vapor/pull/10

如果您现在想使用它,请使用分叉的 repo URL:

https://github.com/abhidsm/lingo-vapor.git 版本为 4.0.0

请通过自述文件进行设置和使用。谢谢。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-05-21
    • 1970-01-01
    • 2020-07-13
    • 2020-11-16
    • 2016-12-24
    • 2018-10-15
    • 2021-09-01
    相关资源
    最近更新 更多