Skip to content

Commit f7cece4

Browse files
authored
feat: Swift 6 and Swift Testing (#61)
* chore: project updates * chore: Swift 6 & Swift Testing * chore: adds Swift 6 to test matrix * chore: narrow down testing * chore: add macos latest * chore: ci * chore: Cache --------- Co-authored-by: danthorpe <[email protected]>
1 parent 3d33f59 commit f7cece4

File tree

19 files changed

+711
-454
lines changed

19 files changed

+711
-454
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,6 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16-
analysis:
17-
name: CodeQL
18-
if: github.event_name != 'workflow_dispatch'
19-
uses: danthorpe/ci/.github/workflows/static-analysis.yml@main
20-
permissions:
21-
actions: read
22-
contents: read
23-
security-events: write
24-
with:
25-
matrix: >
26-
{
27-
"include": [
28-
{
29-
"os": "ubuntu-latest",
30-
"swift": "latest",
31-
"xcode": "latest"
32-
}
33-
]
34-
}
3516

3617
swift-package-test:
3718
name: Test Swift Package
@@ -42,26 +23,21 @@ jobs:
4223
{
4324
"include": [
4425
{
45-
"os": "macos-14",
46-
"swift": "5.9",
47-
"xcode": "15.1"
48-
},
49-
{
50-
"os": "macos-14",
51-
"swift": "5.10",
52-
"xcode": "15.3"
26+
"os": "macos-latest",
27+
"xcode": "latest",
28+
"swift": "6.0"
5329
},
5430
{
5531
"os": "ubuntu-latest",
56-
"swift": "5.10"
32+
"swift": "6.0"
5733
}
5834
]
5935
}
6036
6137
docs:
6238
name: Docs
6339
if: github.event_name == 'push'
64-
needs: [analysis, swift-package-test]
40+
needs: [swift-package-test]
6541
uses: danthorpe/ci/.github/workflows/docs.yml@main
6642
with:
6743
os: 'macos-14'

Package.resolved

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

Package.swift

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// swift-tools-version: 5.8
2-
import PackageDescription
1+
// swift-tools-version: 6.0
2+
@preconcurrency import PackageDescription
33

44
var package = Package(name: "swift-utilities")
55

@@ -46,7 +46,8 @@ AssertionExtras
4646
]
4747
$0.with = [
4848
.customDump,
49-
.xcTestDynamicOverlay,
49+
.issueReporting,
50+
.issueReportingTestSupport,
5051
]
5152
}
5253
#if !os(Linux)
@@ -58,8 +59,10 @@ Cache
5859
]
5960
$0.with = [
6061
.asyncAlgorithms,
62+
.concurrencyExtras,
6163
.deque,
6264
.dependencies,
65+
.dependenciesMacros,
6366
.orderedCollections,
6467
]
6568
}
@@ -76,7 +79,9 @@ FileManagerClient
7679
$0.createProduct = .library
7780
$0.createUnitTests = false
7881
$0.with = [
79-
.xcTestDynamicOverlay
82+
.dependencies,
83+
.dependenciesMacros,
84+
.issueReporting,
8085
]
8186
}
8287
Protected
@@ -90,7 +95,7 @@ Reachability
9095
$0.with = [
9196
.asyncAlgorithms,
9297
.dependencies,
93-
.xcTestDynamicOverlay,
98+
.issueReporting,
9499
]
95100
}
96101
ShortID
@@ -113,23 +118,30 @@ ShortID
113118
package.dependencies = [
114119
.package(url: "https://github.com/apple/swift-async-algorithms", from: "1.0.0"),
115120
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.2"),
116-
.package(url: "https://github.com/apple/swift-collections", from: "1.0.2"),
121+
.package(url: "https://github.com/apple/swift-collections", from: "1.1.0"),
117122
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
123+
.package(url: "https://github.com/pointfreeco/swift-concurrency-extras", from: "1.3.0"),
118124
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.0.0"),
119-
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.2.0"),
120-
.package(url: "http://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.1.2"),
125+
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.7.0"),
126+
.package(url: "http://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.5.0"),
121127
]
122128

123129
extension Target.Dependency {
124130
static let asyncAlgorithms: Self = .product(
125131
name: "AsyncAlgorithms", package: "swift-async-algorithms"
126132
)
133+
static let concurrencyExtras: Self = .product(
134+
name: "ConcurrencyExtras", package: "swift-concurrency-extras"
135+
)
127136
static let customDump: Self = .product(
128137
name: "CustomDump", package: "swift-custom-dump"
129138
)
130139
static let dependencies: Self = .product(
131140
name: "Dependencies", package: "swift-dependencies"
132141
)
142+
static let dependenciesMacros: Self = .product(
143+
name: "DependenciesMacros", package: "swift-dependencies"
144+
)
133145
static let deque: Target.Dependency = .product(
134146
name: "DequeModule", package: "swift-collections"
135147
)
@@ -139,8 +151,11 @@ extension Target.Dependency {
139151
static let tagged: Self = .product(
140152
name: "Tagged", package: "swift-tagged"
141153
)
142-
static let xcTestDynamicOverlay: Self = .product(
143-
name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"
154+
static let issueReporting: Self = .product(
155+
name: "IssueReporting", package: "xctest-dynamic-overlay"
156+
)
157+
static let issueReportingTestSupport: Self = .product(
158+
name: "IssueReportingTestSupport", package: "xctest-dynamic-overlay"
144159
)
145160
}
146161

@@ -347,7 +362,7 @@ infix operator <>
347362
extension String {
348363

349364
/// Adds the string as a module to the package, using the provided module
350-
static func <+ (lhs: String, rhs: Module) {
365+
@MainActor static func <+ (lhs: String, rhs: Module) {
351366
var module = rhs
352367
module.name = lhs
353368
package.add(module: module)
@@ -358,7 +373,7 @@ infix operator <+
358373
extension String {
359374

360375
/// Adds the string as a module to the package, allowing for inline customization
361-
static func <> (lhs: String, rhs: Module.Builder) {
376+
@MainActor static func <> (lhs: String, rhs: Module.Builder) {
362377
var module = Module(name: lhs)
363378
rhs(&module)
364379
package.add(module: module)

0 commit comments

Comments
 (0)