Skip to content

Commit 2d60d40

Browse files
authored
Support SwiftSyntax 602. (#3776)
* Support SwiftSyntax 602. * Re-record snapshots.
1 parent 85eb525 commit 2d60d40

File tree

4 files changed

+101
-23
lines changed

4 files changed

+101
-23
lines changed

Package.resolved

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ let package = Package(
3131
.package(url: "https://github.com/pointfreeco/swift-sharing", "0.1.2"..<"3.0.0"),
3232
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.3.0"),
3333
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.0.0"),
34-
.package(url: "https://github.com/swiftlang/swift-syntax", "509.0.0"..<"602.0.0"),
34+
.package(url: "https://github.com/swiftlang/swift-syntax", "509.0.0"..<"603.0.0"),
3535
],
3636
targets: [
3737
.target(

[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ let package = Package(
3131
.package(url: "https://github.com/pointfreeco/swift-sharing", "0.1.2"..<"3.0.0"),
3232
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.3.0"),
3333
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.0.0"),
34-
.package(url: "https://github.com/swiftlang/swift-syntax", "509.0.0"..<"602.0.0"),
34+
.package(url: "https://github.com/swiftlang/swift-syntax", "509.0.0"..<"603.0.0"),
3535
],
3636
targets: [
3737
.target(

Tests/ComposableArchitectureMacrosTests/ReducerMacroTests.swift

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,12 @@
241241
enum CaseScope {
242242
243243
}
244+
245+
#if swift(<5.10)
246+
@MainActor(unsafe)
247+
#else
248+
@preconcurrency @MainActor
249+
#endif
244250
static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
245251
switch store.state {
246252
@@ -320,6 +326,12 @@
320326
case tweet(ComposableArchitecture.StoreOf<Tweet>)
321327
case alert(AlertState<Alert>)
322328
}
329+
330+
#if swift(<5.10)
331+
@MainActor(unsafe)
332+
#else
333+
@preconcurrency @MainActor
334+
#endif
323335
static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
324336
switch store.state {
325337
case .activity:
@@ -384,6 +396,12 @@
384396
case timeline(ComposableArchitecture.StoreOf<Timeline>)
385397
case meeting(ComposableArchitecture.StoreOf<Meeting>)
386398
}
399+
400+
#if swift(<5.10)
401+
@MainActor(unsafe)
402+
#else
403+
@preconcurrency @MainActor
404+
#endif
387405
static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
388406
switch store.state {
389407
case .timeline:
@@ -432,6 +450,12 @@
432450
enum CaseScope {
433451
434452
}
453+
454+
#if swift(<5.10)
455+
@MainActor(unsafe)
456+
#else
457+
@preconcurrency @MainActor
458+
#endif
435459
static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
436460
switch store.state {
437461
@@ -482,6 +506,12 @@
482506
483507
}
484508
509+
#if swift(<5.10)
510+
@MainActor(unsafe)
511+
#else
512+
@preconcurrency @MainActor
513+
#endif
514+
485515
package static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
486516
switch store.state {
487517
@@ -532,6 +562,12 @@
532562
533563
}
534564
565+
#if swift(<5.10)
566+
@MainActor(unsafe)
567+
#else
568+
@preconcurrency @MainActor
569+
#endif
570+
535571
public static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
536572
switch store.state {
537573
@@ -580,6 +616,12 @@
580616
enum CaseScope {
581617
case alert(AlertState<Never>)
582618
}
619+
620+
#if swift(<5.10)
621+
@MainActor(unsafe)
622+
#else
623+
@preconcurrency @MainActor
624+
#endif
583625
static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
584626
switch store.state {
585627
case let .alert(v0):
@@ -638,6 +680,12 @@
638680
case activity(ComposableArchitecture.StoreOf<Activity>)
639681
case timeline(ComposableArchitecture.StoreOf<Timeline>)
640682
}
683+
684+
#if swift(<5.10)
685+
@MainActor(unsafe)
686+
#else
687+
@preconcurrency @MainActor
688+
#endif
641689
static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
642690
switch store.state {
643691
case .activity:
@@ -697,6 +745,12 @@
697745
case timeline(ComposableArchitecture.StoreOf<Timeline>)
698746
case meeting(Meeting)
699747
}
748+
749+
#if swift(<5.10)
750+
@MainActor(unsafe)
751+
#else
752+
@preconcurrency @MainActor
753+
#endif
700754
static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
701755
switch store.state {
702756
case .timeline:
@@ -760,6 +814,12 @@
760814
case dialog(ConfirmationDialogState<Dialog>)
761815
case meeting(Meeting, syncUp: SyncUp)
762816
}
817+
818+
#if swift(<5.10)
819+
@MainActor(unsafe)
820+
#else
821+
@preconcurrency @MainActor
822+
#endif
763823
static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
764824
switch store.state {
765825
case let .alert(v0):
@@ -830,6 +890,12 @@
830890
case popover(ComposableArchitecture.StoreOf<Counter>)
831891
case sheet(ComposableArchitecture.StoreOf<Counter>)
832892
}
893+
894+
#if swift(<5.10)
895+
@MainActor(unsafe)
896+
#else
897+
@preconcurrency @MainActor
898+
#endif
833899
static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
834900
switch store.state {
835901
case .drillDown:
@@ -884,6 +950,12 @@
884950
enum CaseScope {
885951
case feature(ComposableArchitecture.StoreOf<Nested.Feature>)
886952
}
953+
954+
#if swift(<5.10)
955+
@MainActor(unsafe)
956+
#else
957+
@preconcurrency @MainActor
958+
#endif
887959
static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
888960
switch store.state {
889961
case .feature:
@@ -1246,6 +1318,12 @@
12461318
#endif
12471319
12481320
}
1321+
1322+
#if swift(<5.10)
1323+
@MainActor(unsafe)
1324+
#else
1325+
@preconcurrency @MainActor
1326+
#endif
12491327
static func scope(_ store: ComposableArchitecture.Store<Self.State, Self.Action>) -> CaseScope {
12501328
switch store.state {
12511329
case .child:

0 commit comments

Comments
 (0)