Skip to content

Commit a8ae8f7

Browse files
committed
Recore SwiftSyntaxMacrosTestSupport on top of SwiftSyntaxMacrosTestSupportFrameworkAgnostic
1 parent 4e6b110 commit a8ae8f7

File tree

4 files changed

+31
-499
lines changed

4 files changed

+31
-499
lines changed

Package.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ let package = Package(
2727
.library(name: "SwiftSyntaxMacros", targets: ["SwiftSyntaxMacros"]),
2828
.library(name: "SwiftSyntaxMacroExpansion", targets: ["SwiftSyntaxMacroExpansion"]),
2929
.library(name: "SwiftSyntaxMacrosTestSupport", targets: ["SwiftSyntaxMacrosTestSupport"]),
30+
.library(
31+
name: "SwiftSyntaxMacrosTestSupportFrameworkAgnostic",
32+
targets: ["SwiftSyntaxMacrosTestSupportFrameworkAgnostic"]
33+
),
3034
],
3135
targets: [
3236
// MARK: - Internal helper targets
@@ -223,6 +227,7 @@ let package = Package(
223227
"SwiftIDEUtils",
224228
"SwiftParser",
225229
"SwiftSyntaxMacros",
230+
"SwiftSyntaxMacrosTestSupportFrameworkAgnostic",
226231
"SwiftSyntaxMacroExpansion",
227232
]
228233
),

Release Notes/600.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@
9191
- Description: `SyntaxIdentifier.indexInTree` allows the retrieval of a `SyntaxIdentifier` that identifies the syntax node independent of the syntax tree. `SyntaxIdentifier.fromIndexInTree` allows the creation for a `SyntaxIdentifier` from a tree-agnostic `SyntaxIdentifier.IndexInTree` and the tree's root node.
9292
- Pull request: https://github.com/apple/swift-syntax/pull/2594
9393

94+
- `SwiftSyntaxMacrosTestSupportFrameworkAgnostic`
95+
- Description: A version of the `SwiftSyntaxMacrosTestSupport` module that doesn't depend on `Foundation` or `XCTest` and can thus be used to write macro tests using `swift-testing`. Since swift-syntax can't depend on swift-testing (which would incur a circular dependency since swift-testing depends on swift-syntax), users need to manually specify a failure handler like the following, that fails the swift-testing test: `Issue.record(Comment(rawValue: $0.message), fileID: $0.location.fileID.description, filePath: $0.location.filePath.description, line: Int($0.location.line), column: Int($0.location.column))`
96+
- Pull request: https://github.com/apple/swift-syntax/pull/2647
97+
9498
## API Behavior Changes
9599

96100
## Deprecations

0 commit comments

Comments
 (0)