-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
137 lines (124 loc) · 5.26 KB
/
Copy pathPackage.swift
File metadata and controls
137 lines (124 loc) · 5.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// swift-tools-version: 6.3.3
import PackageDescription
let package = Package(
name: "swift-async",
platforms: [
.macOS(.v26),
.iOS(.v26),
.tvOS(.v26),
.watchOS(.v26),
.visionOS(.v26)
],
products: [
.library(
name: "Async",
targets: ["Async"]
),
.library(
name: "Async Sequence",
targets: ["Async Sequence"]
),
.library(
name: "Async Stream",
targets: ["Async Stream"]
),
.library(
name: "Async Test Support",
targets: ["Async Test Support"]
),
],
dependencies: [
.package(url: "https://github.com/swift-primitives/swift-async-primitives.git", branch: "main"),
.package(url: "https://github.com/swift-primitives/swift-column-primitives.git", branch: "main"),
.package(url: "https://github.com/swift-primitives/swift-buffer-ring-primitives.git", branch: "main"),
.package(url: "https://github.com/swift-primitives/swift-buffer-primitives.git", branch: "main"),
.package(url: "https://github.com/swift-primitives/swift-queue-primitives.git", branch: "main"),
.package(url: "https://github.com/swift-primitives/swift-reference-primitives.git", branch: "main"),
.package(url: "https://github.com/swift-primitives/swift-standard-library-extensions.git", branch: "main"),
.package(url: "https://github.com/swift-foundations/swift-clocks.git", branch: "main"),
.package(url: "https://github.com/swift-foundations/swift-dependencies.git", branch: "main"),
.package(url: "https://github.com/swift-foundations/swift-clocks-dependencies.git", branch: "main"),
.package(url: "https://github.com/swift-primitives/swift-memory-heap-primitives.git", branch: "main"),
.package(url: "https://github.com/swift-primitives/swift-storage-primitives.git", branch: "main"),
],
targets: [
.target(
name: "Async Sequence",
dependencies: [
.product(name: "Async Primitives", package: "swift-async-primitives"),
]
),
// MARK: - Async Stream Core (internal-only)
.target(
name: "Async Stream Core",
dependencies: [
.product(name: "Async Primitives", package: "swift-async-primitives"),
.product(name: "Buffer Primitives", package: "swift-buffer-primitives"),
.product(name: "Queue Primitives", package: "swift-queue-primitives"),
.product(name: "Clocks", package: "swift-clocks"),
.product(name: "Reference Primitives", package: "swift-reference-primitives"),
]
),
// MARK: - Async Stream
.target(
name: "Async Stream",
dependencies: [
.product(name: "Column Primitives", package: "swift-column-primitives"),
.product(name: "Buffer Ring Primitive", package: "swift-buffer-ring-primitives"),
.product(name: "Buffer Ring Bounded Primitive", package: "swift-buffer-ring-primitives"),
"Async Stream Core",
.product(name: "Buffer Ring Primitives", package: "swift-buffer-ring-primitives"),
.product(name: "Clocks Dependencies", package: "swift-clocks-dependencies"),
.product(name: "Standard Library Extensions", package: "swift-standard-library-extensions"),
.product(name: "Memory Heap Primitives", package: "swift-memory-heap-primitives"),
.product(name: "Storage Contiguous Primitives", package: "swift-storage-primitives"),
]
),
.target(
name: "Async",
dependencies: [
"Async Sequence",
"Async Stream",
]
),
// MARK: - Test Support
.target(
name: "Async Test Support",
dependencies: [
"Async",
],
path: "Tests/Support"
),
// MARK: - Tests
.testTarget(
name: "Async Sequence Tests",
dependencies: [
"Async Test Support",
]
),
.testTarget(
name: "Async Stream Tests",
dependencies: [
"Async Test Support",
.product(name: "Clocks Dependencies", package: "swift-clocks-dependencies"),
]
)
],
swiftLanguageModes: [.v6]
)
for target in package.targets where ![.system, .binary, .plugin, .macro].contains(target.type) {
let ecosystem: [SwiftSetting] = [
.strictMemorySafety(),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault"),
.enableUpcomingFeature("MemberImportVisibility"),
.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
.enableExperimentalFeature("LifetimeDependence"),
.enableExperimentalFeature("Lifetimes"),
.enableExperimentalFeature("SuppressedAssociatedTypes"),
.enableUpcomingFeature("InferIsolatedConformances"),
.enableUpcomingFeature("LifetimeDependence"),
]
let package: [SwiftSetting] = []
target.swiftSettings = (target.swiftSettings ?? []) + ecosystem + package
}