Skip to content

603.0.2

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Jun 16:07
· 234 commits to main since this release
79e4b74

API Behavior Changes

  • SwiftSyntaxMacrosTestSupport now supports Swift Testing in addition to XCTest
    • Description: Macro implementations can now be tested using Swift Testing. Calling assertMacroExpansion() from a Swift Testing test will record failures as test issues automatically.
    • Pull Request: #3352
    • Migration steps: None required. Existing tests using SwiftSyntaxMacrosTestSupport with XCTest continue to work unchanged, but you can convert such tests to Swift Testing if desired.
    • Notes: If your project has an explicit dependency on the swift-testing package, rather than using a built-in copy of the Testing module, you may encounter build or runtime issues. This is a known limitation of using a non-built-in distribution of Swift Testing; the Distributions documentation covers this topic in detail. There are two ways to resolve this: (1) remove the dependency on the swift-testing package and switch to using a built-in copy, as the documentation recommends; or (2) import SwiftSyntaxMacrosGenericTestSupport instead of SwiftSyntaxMacrosTestSupport and supply your own failureHandler: closure that calls Issue.record() explicitly. (The latter works correctly even when using a package dependency.)

Full Changelog: 603.0.1...603.0.2