# Swift Syntax 603 Release Notes

## New APIs

- `SwiftIfConfig.StaticBuildConfiguration` a data structure for a build configuration.
  - Description: This describes all of the aspects of a build configuration that are needed for #if evaluation. It is Codable so that it can be stored and replayed later.
  - Pull Request: https://github.com/swiftlang/swift-syntax/pull/3154

- `MacroExpansionContext.buildConfiguration`
  - Description: `MacroExpansionContext` now has `buildConfiguration` property describing the build configuration that will be used with the generated source code.
  - Pull Request: https://github.com/swiftlang/swift-syntax/pull/3154

## API Behavior Changes

### 603.0.2

- `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: https://github.com/swiftlang/swift-syntax/pull/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](https://github.com/swiftlang/swift-testing/blob/main/Documentation/Distributions.md) 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](https://github.com/swiftlang/swift-testing/blob/main/Documentation/Distributions.md) 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.)

## Deprecations

## API-Incompatible Changes

## Template

- *Affected API or two word description*
  - Description: *A 1-2 sentence description of the new/modified API*
  - Issue: *If an issue exists for this change, a link to the issue*
  - Pull Request: *Link to the pull request(s) that introduces this change*
  - Migration steps: Steps that adopters of swift-syntax should take to move to the new API (required for deprecations and API-incompatible changes).
  - Notes: *In case of deprecations or API-incompatible changes, the reason why this change was made and the suggested alternative*

*Insert entries in chronological order, with newer entries at the bottom*

