Skip to content

Commit

Permalink
Migrate to Swift 6.
Browse files Browse the repository at this point in the history
  • Loading branch information
WendellXY committed Sep 26, 2024
1 parent 66fd403 commit 5a3837b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.10
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import CompilerPluginSupport
Expand All @@ -15,7 +15,7 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/apple/swift-syntax.git", from: "510.0.0"),
.package(url: "https://github.com/apple/swift-syntax.git", from: "600.0.0")
],
targets: [
.target(
Expand Down
4 changes: 2 additions & 2 deletions Sources/CodableKitMacros/CodableMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ extension CodableMacro {
"from decoder: any Decoder"
}
),
effectSpecifiers: .init(throwsSpecifier: .keyword(.throws))
effectSpecifiers: .init(throwsClause: .init(throwsSpecifier: .keyword(.throws)))
)
) {
CodeBlockItemSyntax(item: .decl(core.genDecodeContainerDecl()))
Expand Down Expand Up @@ -226,7 +226,7 @@ extension CodableMacro {
parameterClause: FunctionParameterClauseSyntax {
"to encoder: any Encoder"
},
effectSpecifiers: .init(throwsSpecifier: .keyword(.throws))
effectSpecifiers: .init(throwsClause: .init(throwsSpecifier: .keyword(.throws)))
)
) {
CodeBlockItemSyntax(item: .decl(core.genEncodeContainerDecl()))
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodableKitMacros/CodeGenCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal enum StructureType: Sendable {
}

@preconcurrency // Disable warning when turning on StrictConcurrency Swift feature
internal final class CodeGenCore {
internal final class CodeGenCore: @unchecked Sendable {
internal typealias Property = CodableMacro.Property
internal typealias MacroContextKey = String

Expand Down

0 comments on commit 5a3837b

Please sign in to comment.