Skip to content

Commit 68a3c1d

Browse files
authored
Swift 6.1 (#27)
* Update dependencies * Adopt Swift 6 * Update configurations and readme * Revert collapsed call * Empty commit to trigger CI * Attempt to fix linux concurrenyc failure * Attempt to fix linux concurrenyc failure 2
1 parent 953c698 commit 68a3c1d

26 files changed

+92
-63
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ on:
66
jobs:
77
publish:
88
name: Publish
9-
runs-on: macos-14
9+
runs-on: macos-15
1010
strategy:
1111
matrix:
1212
xcode_version:
13-
- "15.4"
13+
- "16.4"
1414
env:
1515
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
1616
steps:

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Test on Linux
1212
runs-on: ubuntu-22.04
1313
container:
14-
image: swift:5.10
14+
image: swift:6.1
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Show Environments
@@ -26,11 +26,11 @@ jobs:
2626
run: make test
2727
macOS:
2828
name: Test on macOS
29-
runs-on: macos-14
29+
runs-on: macos-15
3030
strategy:
3131
matrix:
3232
xcode_version:
33-
- "15.4"
33+
- "16.4"
3434
env:
3535
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
3636
steps:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SWIFT_BUILD_FLAGS := -c release --disable-sandbox
44
TOOL_NAME := swift-mod
55
XCODE_DEFAULT_TOOLCHAIN := /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
66
GITHUB_REPO := ra1028/$(TOOL_NAME)
7-
DOCKER_IMAGE_NAME := swift:5.10
7+
DOCKER_IMAGE_NAME := swift:6.1
88

99
ifeq ($(shell uname), Darwin)
1010
SWIFT_BUILD_FLAGS += --arch arm64 --arch x86_64

Package.resolved

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

Package.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.10
1+
// swift-tools-version:6.1
22

33
import PackageDescription
44

@@ -11,13 +11,13 @@ let package = Package(
1111
.executable(
1212
name: "swift-mod",
1313
targets: ["swift-mod"]
14-
)
14+
),
1515
],
1616
dependencies: [
17-
.package(url: "https://github.com/apple/swift-argument-parser.git", exact: "1.5.0"),
18-
.package(url: "https://github.com/swiftlang/swift-syntax.git", exact: "510.0.3"),
19-
.package(url: "https://github.com/swiftlang/swift-tools-support-core.git", exact: "0.7.1"),
20-
.package(url: "https://github.com/jpsim/Yams.git", exact: "5.1.3")
17+
.package(url: "https://github.com/apple/swift-argument-parser.git", exact: "1.5.1"),
18+
.package(url: "https://github.com/swiftlang/swift-syntax.git", exact: "601.0.1"),
19+
.package(url: "https://github.com/swiftlang/swift-tools-support-core.git", exact: "0.7.3"),
20+
.package(url: "https://github.com/jpsim/Yams.git", exact: "6.0.1")
2121
],
2222
targets: [
2323
.executableTarget(
@@ -56,5 +56,5 @@ let package = Package(
5656
dependencies: ["SwiftModCore"]
5757
),
5858
],
59-
swiftLanguageVersions: [.v5]
59+
swiftLanguageModes: [.v6]
6060
)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ So you should use swift-mod version that built with compatible version of Swift
316316
|5.8 |0.2.0 |
317317
|5.9 |0.2.0 |
318318
|5.10 |0.2.1 |
319+
|6.1 |0.3.0 |
319320

320321
---
321322

Sources/SwiftModCommands/Arguments.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import ArgumentParser
22
import TSCBasic
33

4-
public enum Mode: String, CaseIterable, ExpressibleByArgument {
4+
public enum Mode: String, CaseIterable, Sendable, ExpressibleByArgument {
55
case modify
66
case dryRun = "dry-run"
77
case check
88
}
99

10-
extension AbsolutePath: ExpressibleByArgument {
10+
extension AbsolutePath: @retroactive ExpressibleByArgument {
1111
public init?(argument: String) {
1212
if let cwd = localFileSystem.currentWorkingDirectory {
1313
try? self.init(validating: argument, relativeTo: cwd)

Sources/SwiftModCommands/Configuration/Configuration+Template.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import SwiftModRules
33
import TSCBasic
44

55
public extension Configuration {
6-
static let template: Configuration = {
6+
nonisolated(unsafe) static let template: Configuration = {
77
let format = Format(
88
indent: .spaces(4),
99
lineBreakBeforeEachArgument: true

Sources/SwiftModCommands/InitCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Foundation
33
import TSCBasic
44

55
public struct InitCommand: ParsableCommand {
6-
public static var configuration = CommandConfiguration(
6+
public static let configuration = CommandConfiguration(
77
commandName: "init",
88
abstract: "Generates a modify configuration file."
99
)

Sources/SwiftModCommands/RulesCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import ArgumentParser
22
import SwiftModCore
33

44
public struct RulesCommand: ParsableCommand {
5-
public static var configuration = CommandConfiguration(
5+
public static let configuration = CommandConfiguration(
66
commandName: "rules",
77
abstract: "Display the list of rules."
88
)

0 commit comments

Comments
 (0)