Skip to content

Commit 3a7a2cc

Browse files
authored
Bump to Swift 6.1 (#8)
1 parent 9dc5cc3 commit 3a7a2cc

17 files changed

Lines changed: 159 additions & 132 deletions

File tree

.editorconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# EditorConfig is awesome: https://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
max_line_length = 120
11+
12+
[*.swift]
13+
indent_style = tab
14+
15+
[*.md]
16+
indent_style = space
17+
indent_size = 4
18+
19+
[*.json]
20+
indent_style = tab
21+
22+
[*.yml]
23+
indent_style = space
24+
indent_size = 4

.github/workflows/ci.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
apple:
3535
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.title, '[skip ci]')
3636
name: ${{ matrix.platform }} (Swift ${{ matrix.swift }})
37-
runs-on: macos-15
37+
runs-on: ${{ matrix.runner }}
3838
strategy:
3939
fail-fast: false
4040
matrix:
@@ -43,12 +43,16 @@ jobs:
4343
- mac-catalyst
4444
- macOS
4545
- tvOS
46-
- watchOS
4746
- visionOS
47+
- watchOS
4848
swift:
49-
- "6.0"
5049
- "6.1"
51-
- "6.2"
50+
- "6.3"
51+
include:
52+
- swift: "6.1"
53+
runner: macos-15
54+
- swift: "6.3"
55+
runner: macos-26
5256
steps:
5357
- name: Git Checkout
5458
uses: actions/checkout@v5
@@ -61,10 +65,10 @@ jobs:
6165
verbosity: xcbeautify
6266

6367
- name: Disable SwiftSyntax Prebuilts
68+
# TODO: Drop or update Swift version constraint as prebuilts become available
69+
if: ${{ matrix.swift == '6.3' }}
6470
run: |
6571
defaults write com.apple.dt.Xcode IDEPackageEnablePrebuilts -bool NO
66-
67-
# nuke cache to ensure it takes effect
6872
rm -rf ~/Library/Developer/Xcode/DerivedData
6973
rm -rf ~/Library/Developer/Xcode/SourcePackages
7074
rm -rf ~/Library/Caches/org.swift.swiftpm
@@ -87,7 +91,6 @@ jobs:
8791
platform: ${{ matrix.platform }}
8892
swift: ~${{ matrix.swift }}
8993
action: test
90-
scheme: ObjCRuntimeTools
9194
verbosity: xcbeautify
9295

9396
check-swift-syntax-compatibility:
@@ -101,5 +104,5 @@ jobs:
101104
uses: davdroman/swift-macro-compatibility-check@from-version
102105
with:
103106
run-tests: false
104-
from-version: "600.0.0"
107+
from-version: "601.0.0"
105108
major-versions-only: true

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.0
1+
6.1

Package.resolved

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

Package.swift

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

33
import CompilerPluginSupport
44
import PackageDescription
@@ -22,9 +22,9 @@ let package = Package(
2222
dependencies: [
2323
"Association",
2424
"Swizzling",
25-
]
25+
],
2626
),
27-
]
27+
],
2828
)
2929

3030
// MARK: Association
@@ -40,7 +40,7 @@ package.targets += [
4040
dependencies: [
4141
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
4242
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
43-
]
43+
],
4444
),
4545

4646
.testTarget(
@@ -49,10 +49,7 @@ package.targets += [
4949
"Association",
5050
"AssociationMacro",
5151
.product(name: "MacroTesting", package: "swift-macro-testing"),
52-
// For some reason, with Swift Syntax prebuilts enabled, we need to depend on SwiftCompilerPlugin here to work around error:
53-
// Compilation search paths unable to resolve module dependency: 'SwiftCompilerPlugin'
54-
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
55-
]
52+
],
5653
),
5754
]
5855

@@ -69,7 +66,7 @@ package.targets += [
6966
dependencies: [
7067
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
7168
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
72-
]
69+
],
7370
),
7471

7572
.testTarget(
@@ -78,10 +75,7 @@ package.targets += [
7875
"Swizzling",
7976
"SwizzlingMacro",
8077
.product(name: "MacroTesting", package: "swift-macro-testing"),
81-
// For some reason, with Swift Syntax prebuilts enabled, we need to depend on SwiftCompilerPlugin here to work around error:
82-
// Compilation search paths unable to resolve module dependency: 'SwiftCompilerPlugin'
83-
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
84-
]
78+
],
8579
),
8680
]
8781

@@ -95,5 +89,6 @@ for target in package.targets {
9589
target.swiftSettings? += [
9690
.enableUpcomingFeature("ExistentialAny"),
9791
.enableUpcomingFeature("InternalImportsByDefault"),
92+
.enableUpcomingFeature("MemberImportVisibility"),
9893
]
9994
}

Sources/Association/Macros.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
@attached(peer, names: arbitrary)
22
@attached(accessor)
33
public macro Associated(
4-
_ policy: Policy
4+
_ policy: Policy,
55
) = #externalMacro(
66
module: "AssociationMacro",
7-
type: "AssociatedMacro"
7+
type: "AssociatedMacro",
88
)
99

1010
@attached(accessor)
1111
public macro _Associated(
12-
_ policy: Policy
12+
_ policy: Policy,
1313
) = #externalMacro(
1414
module: "AssociationMacro",
15-
type: "AssociatedMacro"
15+
type: "AssociatedMacro",
1616
)

0 commit comments

Comments
 (0)