If you do really want to go ahead and inline all macros, the best idea I have, is to parse the source file using swift-syntax and for every MacroExpansionDeclSyntax, MacroExpansionExprSyntax and AttributeSyntax node and try expanding those, either by launching sourcekit-lsp and running the Inline macro refactoring action or by launching sourcekitd and running the refactoring from there. Inlining AttributeSyntax might fail because not all attributes are macros. It’s not an easy or clean solution though and I would recommend waiting for the fix to land in SwiftPM if that’s an option for you.