Build SwiftPM dependencies using custom build configuration?

I think the answer is "no", or perhaps even "not yet", but is it possible to build SPM dependencies in Release configuration while the app target builds in Debug?

The only thread of info I've found is this GitHub issue GitHub · Where software is built which indicates it's not a supported feature. It'd be great if there was a way to always use Release mode, but opt into a Debug build for debugging purposes at will.

6 Likes

I’d love to know the answer to this as well!

1 Like

Building plugins in the same configuration as the host project means that build plugins run 15x slower than they could with an out-of-the-box configuration. This is the difference between a plugin taking 0.1s to run (not noticeable) and taking 1.5s to run (super noticeable on incremental builds).

In my own project that uses plugins I've built code to introspect and download a prebuilt release binary for adoptees so the build plugin runs in reasonable time.

This isn't something I expect most developers will devote the time to implement. Most folk will likely see that build plugins run slowly and abandon the tool. Would love to see investment here.

2 Likes