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-7334] SwiftPM should warn if a manifest contains multiple declarations for a dependency #4829

Closed
ankitspd opened this issue Apr 2, 2018 · 2 comments
Labels

Comments

@ankitspd
Copy link
Member

ankitspd commented Apr 2, 2018

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

md5: 67df72eab37edc9460e3b32c5284a719

duplicates:

  • SR-8379 SwiftPM? Crash when compiling LinkerKitIRCBot

Issue Description:

Currently, SwiftPM just merges the requirements in this case but we should emit a warning as this can be a confusing behavior.

@ankitspd
Copy link
Member Author

ankitspd commented Apr 2, 2018

@swift-ci create

@swift-ci
Copy link
Contributor

Comment by Luke Lau (JIRA)

Currently declaring the same dependency twice crashes for me on master instead of merging the requirements:

// swift-tools-version:4.0
import PackageDescription

let package = Package(
    name: "DuplicateDependencies",
    products: [.library(name: "swiftpm-fail", targets: ["swiftpm-fail"])],
    dependencies: [
        .package(url: "https://github.com/apple/example-package-fisheryates", from: "2.0.0"),
        .package(url: "https://github.com/apple/example-package-fisheryates", from: "2.0.3")
    ],
    targets: [.target(name: "DuplicateDependencies", dependencies: ["FisherYates"])]
)
Fatal error: Duplicate values for key: 'FisherYates': file /BuildRoot/Library/Caches/com.apple.xbs/Binaries/swiftlang/install/TempContent/Objects/BNI_assert_lightweight/swift-macosx-x86_64/stdlib/public/core/8/HashedCollections.swift, line 8108

@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

2 participants