Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-5918] SwiftPM should error out when there are two products with same name #4947

Closed
ankitspd opened this issue Sep 18, 2017 · 3 comments
Closed
Labels

Comments

@ankitspd
Copy link
Member

Previous ID SR-5918
Radar rdar://problem/34494792
Original Reporter @aciidb0mb3r
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 6f25eb6056c83f8d218d1cfc0f243c4d

is duplicated by:

  • SR-6537 SRP source breakage: Fatal error: Duplicate values for key: 'BigInt'

Issue Description:

Looks like SwiftPM silently accepts packages which have multiple products with same name. This should be an error.

example: https://github.com/attaswift/BigInt/blob/57ba81a6fb5dcb37b801ce827c1cf24645bfd3e2/Package.swift

import PackageDescription

let package = Package(
    name: "BigInt",
    products: [
        .library(name: "BigInt", type: .dynamic, targets: ["BigInt"]),
        .library(name: "BigInt", type: .static, targets: ["BigInt"])
    ],
    dependencies: [
        .package(url: "https://github.com/attaswift/SipHash", from: "1.2.0")
    ],
    targets: [
        .target(name: "BigInt", dependencies: ["SipHash"], path: "sources"),
        .testTarget(name: "BigIntTests", dependencies: ["BigInt"], path: "tests")
    ],
    swiftLanguageVersions: [4]
)
@ankitspd
Copy link
Member Author

@swift-ci create

@ankitspd
Copy link
Member Author

An attempt was made in #1393 but reverted in #1402 because of https://bugs.swift.org/browse/SR-6488.

@ankitspd
Copy link
Member Author

ankitspd commented Dec 6, 2017

#1411

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant