/SE0415Demo

Primary LanguageSwift

SE0415Demo

Status

  • Minimal demo and test of preamble and body macro adapted from PR tests

Getting started

  • Download and install trunk/main toolchain snapshot
  • Clone this git repository locally
  • Building in Xcode:
    • Select toolchain (Xcode/toolchains) before building

Tips

  • swiftSettings: [ .enableExperimentalFeature("BodyMacros")] on each Package.swift target
  • @_spi() import ... on client code

Known issues

  • (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

Development

  • // Source: indicates code copied from and copyrighted by Apple