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-9402] SwiftPM should diagnose duplicate target dependency declarations and emit a warning #4741

Closed
ankitspd opened this issue Dec 3, 2018 · 4 comments
Assignees
Labels

Comments

@ankitspd
Copy link
Member

ankitspd commented Dec 3, 2018

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

md5: 6e4fb770209c3044614927516adc1ba6

Issue Description:

SwiftPM allows specifying same target dependency twice which might lead to weird stuff after the package loading stage. SwiftPM should diagnose this and emit a warning.

Ex:

let package = Package(
    name: "Foo",
    targets: [
        .target(name: "a"),
        .target(name: "b", dependencies: ["a", "a"]),
    ]
)
@swift-ci
Copy link
Contributor

swift-ci commented Dec 4, 2018

Comment by Michael McGuire (JIRA)

@aciidb0mb3r Is there a reason this should only emit a warning and not fail entirely? Is it valid to have a duplicated target dependency?

@ankitspd
Copy link
Member Author

ankitspd commented Dec 4, 2018

Errors can break the package graph and since most people don’t own their dependencies, it can be very annoying. We usually start with emit warnings and elevate to error in newer tools versions.

@swift-ci
Copy link
Contributor

Comment by Sachin (JIRA)

@aciidb0mb3r Is the issue still there and needs working upon?

@sjavora
Copy link
Contributor

sjavora commented Jan 22, 2022

PR: #4043

@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

3 participants