Skip to content

Commit beb322f

Browse files
committed
Recore SwiftSyntaxMacrosTestSupport on top of SwiftSyntaxMacrosTestSupportFrameworkAgnostic
1 parent 9204b6b commit beb322f

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
@@ -95,6 +95,10 @@
9595
- Description: `Range<AbsolutePosition>` gained a few convenience functions inspired from `ByteSourceRange`: `init(position:length:)`, `length`, `overlapsOrTouches`
9696
- Pull request: https://github.com/apple/swift-syntax/pull/2587
9797

98+
- `SwiftSyntaxMacrosTestSupportFrameworkAgnostic`
99+
- 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))`
100+
- Pull request: https://github.com/apple/swift-syntax/pull/2647
101+
98102
## API Behavior Changes
99103

100104
## Deprecations

0 commit comments

Comments
 (0)