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-3346] SwiftPM: Support for optional sub products #5157

Closed
thomasvl opened this issue Dec 6, 2016 · 1 comment
Closed

[SR-3346] SwiftPM: Support for optional sub products #5157

thomasvl opened this issue Dec 6, 2016 · 1 comment

Comments

@thomasvl
Copy link
Contributor

thomasvl commented Dec 6, 2016

Previous ID SR-3346
Radar None
Original Reporter @thomasvl
Type New Feature
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels New Feature
Assignee None
Priority Medium

md5: 7bc5a670ff6a32d86639c9895d2b5086

duplicates:

  • SR-3606 [SE-0146] Implement Package Manager Product Definitions

Issue Description:

There doesn't seem to be a way for a project to define multiple packages, but allow developers to only depend on a subset of them. But there are times where it makes sense to expose subtargets from a repository to allow developers to depend on exactly what they need minimizing build times and not relying on stripping to pull back out the code that wasn't needed.

Examples:

https://github.com/apple/swift-protobuf defines SwiftProtobuf which is the runtime support for the generate code. It also defines protoc-gen-swift which is a binary (protoc plugin) to actually generate the Swift code. When building an app, developers will likely checkin their generated Swift protobuf code, so they only need the dependency on SwiftProtobuf, but currently they have to also build protoc-gen-swift even though it isn't needed by their app.

Another case this could be useful is something like what was done in the Podspec for GTLR. CocoaPods allows there to be a default target (the Core there) and then there are optional targets for different sub components. A developer can then pick up the specific dependencies they need and don't have to waste the time building all the sub dependencies (and hope they will get stripped out because they weren't needed).

@ankitspd
Copy link
Member

ankitspd commented Dec 6, 2016

@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
Projects
None yet
Development

No branches or pull requests

2 participants