danger / swift

⚠️ Stop saying "you forgot to …" in code review
https://danger.systems/swift/
MIT License
1.04k stars 136 forks source link

Tag 3.12.0 Breaks CI #474

Closed jagreenwood closed 2 years ago

jagreenwood commented 2 years ago

I'm running Danger Swift on Bitrise with the command swift run danger-swift ci. Starting with tag 3.12.0 my danger step is throwing the following error:

error: multiple products named 'DangerDeps' in: 'git', 'swift'
error: multiple targets named 'Danger-Swift' in: 'git', 'swift'

Setting the version to 3.11.1 in Package.swift resolved the issue.

f-meloni commented 2 years ago

Can you please share your Package.swift?

jagreenwood commented 2 years ago

Good call, I had a naming clash on the product with DangerDep. I changed that and now I' back in business. Below is what it was before changing...

// swift-tools-version:5.2
import PackageDescription

let package = Package(
    name: "MobileTools",
    products: [
        .library(name: "DangerDeps", type: .dynamic, targets: ["Danger-Swift"])
    ],
    dependencies: [
        .package(name: "danger-swift", url: "git@github.com:danger/swift.git", .exact("3.11.1"))
    ],
    targets: [
        // This is just an arbitrary Swift file in the app, that has
        // no dependencies outside of Foundation, the dependencies section
        .target(name: "Danger-Swift", dependencies: [
            .product(name: "Danger", package: "danger-swift")])
    ]
)