SwiftPM for large projects (1000+ targets)

I'm trying to add SwiftPM support to a fairly large project (currently using Bazel). The project is a mix of C, C++, and Swift code split into approximately 1000 modules. Currently, there is a single Package.swift manifest in the root containing all targets. I'm able to build it successfully. However, after changing anything in the manifest (even adding a comment), it takes around 2 minutes to begin building. If I try to open the package in Xcode, it takes even longer.
Is there any way to make it faster?

1 Like