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-14245] Allow binaryTargets to declare dependencies in the Swift packages #4449

Open
swift-ci opened this issue Feb 17, 2021 · 5 comments

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-14245
Radar rdar://problem/74616586
Original Reporter RonanMc20 (JIRA User)
Type Improvement
Additional Detail from JIRA
Votes 14
Component/s Package Manager
Labels Improvement
Assignee None
Priority Medium

md5: ba6217da9eadde076a638765bd2e2d45

Issue Description:

Description

Currently the binary target feature in the Swift Package Manager only works for single binary dependencies. The API for `Target` is shaped so that its own static method for returning a `.binaryTarget` does not take a `dependencies` array like the standard `.target` method.

Setting the `dependencies` property on a `Target` type when that type is `binary` results in a crash to the SPM.

There is a workaround for the including dependencies in binary targets but it includes adding a dummy target to your `package.swift` and the result also generates warnings in an integrator's xcode project.

The desired change to the SPM is to allow `binaryTarget`s to declare `dependencies` in their `package.swift` files.

This thread has good detail on the issue and the known workaround for it: https://forums.swift.org/t/swiftpm-binary-target-with-sub-dependencies/40197/11

@typesanitizer
Copy link

@swift-ci create

@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
@phatblat
Copy link
Contributor

Interested to see this implemented. The errors when a binary dependency is missing are very confusing. Wondering where to file an issue for better error messages.

@mattmassicotte
Copy link

I'm actually running into this issue now, and it's fairly painful. Would really love to see a way to handle this better.

@Narayane
Copy link

Narayane commented Oct 3, 2022

Hi @tomerd,

any news to schedule and process this enhancement request?

Thanks.

@mattmassicotte
Copy link

I added an evolution pitch to make this change: https://forums.swift.org/t/accepting-spm-binary-target-dependencies/60619

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants