Kitura / Swift-SMTP

Swift SMTP client
Apache License 2.0
260 stars 60 forks source link

vapor xcode failed #103

Closed jancywen closed 5 years ago

jancywen commented 5 years ago

vapor xcode failed

Generating Xcode Project [Failed]
error: multiple products named 'Logging' in: Console, swift-log
error: multiple targets named 'Logging' in: Console, swift-log

Error: Could not generate Xcode project: error: multiple products named 'Logging' in: Console, swift-log
error: multiple targets named 'Logging' in: Console, swift-log

Package.swift

// swift-tools-version:4.0
import PackageDescription

let package = Package(
    name: "NewBox",
    products: [
        .library(name: "NewBox", targets: ["App"]),
    ],
    dependencies: [
        // 💧 A server-side Swift web framework.
         .package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),

        // mail Server
        .package(url: "https://github.com/IBM-Swift/Swift-SMTP.git", from: "5.1.0")

    ],
    targets: [
        .target(name: "App", dependencies: [ "SwiftSMTP", "Vapor"]),
        .target(name: "Run", dependencies: ["App"]),
        .testTarget(name: "AppTests", dependencies: ["App"])
    ]
)
helenmasters commented 5 years ago

Hi @jancywen,

There is a post on the Swift Forums within the Vapor project about this issue https://forums.swift.org/t/logging-module-name-clash-in-vapor-3/25466.

There is a description in there about why this happened and a workaround describing how to pin to Logger API version to < 1.9.0 (as it doesn't look like the PR to rename Vapor's Logging module has been merged yet).

This should address your issue!

Thanks

jancywen commented 5 years ago

Thank you very much, vapor xcode success