- Minimal demo and test of preamble and body macro adapted from PR tests
- Download and install trunk/main toolchain snapshot
- Clone this git repository locally
- Building in Xcode:
- Select toolchain (Xcode/toolchains) before building
swiftSettings: [ .enableExperimentalFeature("BodyMacros")]
on each Package.swift target@_spi() import ...
on client code
- (Search for
TODO: P1
to find comment tags) - P1 Macro names not seen from client module?
- workaround: declare in client
- possibly d/t
@_spi
- P1 Body macro statements duplicated, resulting in dangling closure
- Excess Tests/MacroChecks helpful but not required
// Source:
indicates code copied from and copyrighted by Apple