How to use a custom build configuration in a Swift Package?

This seems more like a workaround than a solution to me, because now clients of that package need to use "MyConfigName" to get that behaviour. What if I am using two packages with different custom configurations that I need to use? I think this really only works if the packages and the client are tightly coupled, e.g. when you are using packages to break up a larger app.

What would be better is something like "Package Features" idea that Daniel mentioned in My SwiftPM wishlist (aka proposal proposals), a way to opt in to building the package with additional build settings that is independent of the build configuration and can be selected on a per-package basis.

1 Like