Type: New Feature
Component/s: Package Manager
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.
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).