You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 7bc5a670ff6a32d86639c9895d2b5086
duplicates:
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).
The text was updated successfully, but these errors were encountered: