Skip to content

Commit 3ef6234

Browse files
authored
project: Swift 6.2.1 support (#55)
1 parent 1ee698c commit 3ef6234

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

.github/actions/setup-environment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ runs:
1515
with:
1616
version: ${{ inputs.mise-version }}
1717
install: false
18-
- uses: SwiftyLab/setup-swift@latest
18+
- uses: swift-actions/setup-swift@v2
1919
with:
2020
swift-version: ${{ inputs.swift-version }}
2121
- name: Setup Sake

.github/workflows/checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [macos-latest, ubuntu-latest]
18-
swift: ["6.1"]
18+
swift: ["6.1", "6.2.1"]
1919
runs-on: ${{ matrix.os }}
2020
steps:
2121
- name: Checkout repository
@@ -40,7 +40,7 @@ jobs:
4040
uses: ./.github/actions/setup-environment
4141
with:
4242
mise-version: ${{ env.MISE_VERSION }}
43-
swift-version: 6.1
43+
swift-version: 6.2.1
4444
- name: Run lint
4545
run: |
4646
sake lint

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ DerivedData/
77
.swiftpm/configuration/registries.json
88
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
99
.netrc
10+
.claude
1011

1112
TODO.md

SakeApp/ReleaseCommands.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct ReleaseCommands {
3030
}
3131

3232
private enum Constants {
33-
static let swiftVersion = "6.1"
33+
static let swiftVersion = "6.2.1"
3434
static let buildArtifactsDirectory = ".build/artifacts"
3535
static let buildTargets: [BuildTarget] = [
3636
.init(arch: .arm, os: .macos),

Sources/SakeCLI/RunCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct RunCommand: AsyncParsableCommand {
1616

1717
@Argument(
1818
help: "The name of the command to execute.",
19-
completion: .custom(ShellCompletionCommandListGenerator.generate),
19+
completion: .custom(ShellCompletionCommandListGenerator.generate), // For some reasons new async API makes runtime errors
2020
)
2121
var command: String
2222

Sources/SakeCLI/ShellCompletionCommandListGenerator.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@ import SakeCLILibrary
44
import SakeShared
55

66
enum ShellCompletionCommandListGenerator {
7+
private final class UncheckedSendable: @unchecked Sendable {
8+
var value: [String] = []
9+
}
10+
711
@Sendable
812
static func generate(arguments: [String]) -> [String] {
913
let semaphore = DispatchSemaphore(value: 0)
10-
var result: [String] = []
14+
let resultBox = UncheckedSendable()
1115

1216
Task {
13-
result = await generateAsync(arguments: arguments)
17+
resultBox.value = await generateAsync(arguments: arguments)
1418
semaphore.signal()
1519
}
1620

1721
semaphore.wait()
18-
return result
22+
return resultBox.value
1923
}
2024

2125
@Sendable

0 commit comments

Comments
 (0)