i am working on open-sourcing an HTML DSL library, which uses a macro to generate some shims to work around the lack of [Pitch] Metatype Keypaths .
client code is not expected to use the macro, but it causes the library to take an astonishingly long time to build, especially in release mode. so i am wondering if there is a recommended way to automatically “bake” the macro-generated code before committing it to the repo?
SwiftSyntax can also serve you with regards to code generation. You could create a command line tool that parses your code and generates extra files based on the collected information. The tool can be built once and independently, but used whenever there are changes in your library code.