Here is a ridiculous example: let's say that I have my own Foundation implementation and I want to build a project using this new Foundation package. I have other external dependencies that also depend on Foundation.
So let's say that I have
NotFoundation as dependencies.
Is there a way for me to have
AwesomeLibrary compiled in
MyProject as usual, but with
NotFoundation aliased as
Foundation? To make it so that every
import Foundation actually imports
NotFoundation inside the library.
That would only work for source packages of course, not prebuilt binaries. I searched the documentation and Swift Evolutions and I did find ways to alias products of dependencies but not dependencies of dependencies.
The actual reason I'm willing to do that is that I found a problem in XCTest bundled with the Swift Linux toolchain. I already filled an issue on GitHub but in the meantime I would love to temporarily build the project with my own dirty patched XCTest. I use Quick and Nimble so the new XCTest needs to be imported by every dependency as well. I cannot use the package edit mode on a bundled package either.