Create SafeDIPrebuiltGenerator + enable using prebuilt SwiftSyntax binary in Swift 6.1.1 by dfed · Pull Request #161 · dfed/SafeDI (original) (raw)

Prebuilt SwiftSyntax is here, but it's only for macros, which means that in order to take advantage of prebuilt SwiftSyntax, we need to vend a Plugin that does not depend on SwiftSyntax.

This PR creates SafeDIPrebuiltGenerator, which enables adoptees to depend on SafeDI and generate a DI tree without needing to compile SwiftSyntax.

In order to unblock building SafeDI with the IDEPackageEnablePrebuilts user default enabled in Xcode 16.4, I have made it such that SafeDICore is no longer a module that is shared between both the plugin and macro target by symlinking SafeDICore's code into SafeDIMacros. Ideally we'll be able to undo this hack in a future Xcode release.