diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2124c65ae9..05df5b11ef 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,11 +64,91 @@ jobs: "include": [ { "os": "ubuntu-latest", - "swift": "latest" + "swift": "5.9", + "dependencies": { + "swift-syntax": "509.1.1" + } + }, + { + "os": "ubuntu-latest", + "swift": "5.9", + "dependencies": { + "swift-syntax": "510.0.3" + } + }, + { + "os": "ubuntu-latest", + "swift": "5.9", + "dependencies": { + "swift-syntax": "600.0.1" + } + }, + { + "os": "ubuntu-latest", + "swift": "5.9", + "dependencies": { + "swift-syntax": "601.0.1" + } + }, + { + "os": "ubuntu-latest", + "swift": "6.0", + "dependencies": { + "swift-syntax": "509.1.1" + } + }, + { + "os": "ubuntu-latest", + "swift": "6.0", + "dependencies": { + "swift-syntax": "510.0.3" + } + }, + { + "os": "ubuntu-latest", + "swift": "6.0", + "dependencies": { + "swift-syntax": "600.0.1" + } + }, + { + "os": "ubuntu-latest", + "swift": "6.0", + "dependencies": { + "swift-syntax": "601.0.1" + } + }, + { + "os": "ubuntu-latest", + "swift": "6.1", + "dependencies": { + "swift-syntax": "509.1.1" + } + }, + { + "os": "ubuntu-latest", + "swift": "6.1", + "dependencies": { + "swift-syntax": "510.0.3" + } }, { - "os": "macos-13", - "swift": "5.9" + "os": "ubuntu-latest", + "swift": "6.1", + "dependencies": { + "swift-syntax": "600.0.1" + } + }, + { + "os": "ubuntu-latest", + "swift": "6.1", + "dependencies": { + "swift-syntax": "601.0.1" + } + }, + { + "os": "ubuntu-latest", + "swift": "latest" }, { "os": "macos-15", @@ -76,6 +156,36 @@ jobs: } ] } + + # todo: inverestigate failure on swift 5.10 + # { + # "os": "ubuntu-latest", + # "swift": "5.10", + # "dependencies": { + # "swift-syntax": "509.1.1" + # } + # }, + # { + # "os": "ubuntu-latest", + # "swift": "5.10", + # "dependencies": { + # "swift-syntax": "510.0.3" + # } + # }, + # { + # "os": "ubuntu-latest", + # "swift": "5.10", + # "dependencies": { + # "swift-syntax": "600.0.1" + # } + # }, + # { + # "os": "ubuntu-latest", + # "swift": "5.10", + # "dependencies": { + # "swift-syntax": "601.0.1" + # } + # }, cocoapods-test: name: CocoaPods diff --git a/Package.swift b/Package.swift index c59a11988e..f3d5d6870d 100644 --- a/Package.swift +++ b/Package.swift @@ -20,7 +20,7 @@ let package = Package( .plugin(name: "MetaProtocolCodable", targets: ["MetaProtocolCodable"]), ], dependencies: [ - .package(url: "https://github.com/swiftlang/swift-syntax.git", "509.1.0"..<"601.0.0"), + .package(url: "https://github.com/swiftlang/swift-syntax.git", "509.1.0"..<"602.0.0"), .package(url: "https://github.com/apple/swift-collections.git", from: "1.0.4"), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.2"), .package(url: "https://github.com/swiftlang/swift-format", from: "600.0.0"), diff --git a/Package@swift-5.swift b/Package@swift-5.swift index bacb7bd7c5..899b28c5c4 100644 --- a/Package@swift-5.swift +++ b/Package@swift-5.swift @@ -20,7 +20,7 @@ let package = Package( .plugin(name: "MetaProtocolCodable", targets: ["MetaProtocolCodable"]), ], dependencies: [ - .package(url: "https://github.com/swiftlang/swift-syntax.git", "509.1.0"..<"601.0.0"), + .package(url: "https://github.com/swiftlang/swift-syntax.git", "509.1.0"..<"602.0.0"), .package(url: "https://github.com/apple/swift-collections.git", from: "1.0.4"), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.2"), .package(url: "https://github.com/swiftlang/swift-format", from: "600.0.0"), diff --git a/Sources/PluginCore/Attributes/CodedAs.swift b/Sources/PluginCore/Attributes/CodedAs.swift index e8f2712ccd..7ed5755862 100644 --- a/Sources/PluginCore/Attributes/CodedAs.swift +++ b/Sources/PluginCore/Attributes/CodedAs.swift @@ -24,7 +24,7 @@ package struct CodedAs: PropertyAttribute { /// the identifier to this type. var type: TypeSyntax? { return node.attributeName.as(IdentifierTypeSyntax.self)? - .genericArgumentClause?.arguments.first?.argument + .genericArgumentClause?.arguments.first?.argument.as(TypeSyntax.self) } /// Creates a new instance with the provided node. diff --git a/Sources/PluginCore/Variables/Property/PropertyVariable.swift b/Sources/PluginCore/Variables/Property/PropertyVariable.swift index 1a75c6e55c..86c8d794ba 100644 --- a/Sources/PluginCore/Variables/Property/PropertyVariable.swift +++ b/Sources/PluginCore/Variables/Property/PropertyVariable.swift @@ -163,7 +163,7 @@ extension PropertyVariable { type.name.text == "Optional", let gArgs = type.genericArgumentClause?.arguments, gArgs.count == 1, - let type = gArgs.first?.argument + let type = gArgs.first?.argument.as(TypeSyntax.self) { dType = type dMethod = "\(method)IfPresent"