Skip to content

Commit 64afaaa

Browse files
authored
ci: added more swift versions and swift-syntax coveragae (#131)
1 parent 3dc1c7a commit 64afaaa

File tree

5 files changed

+117
-7
lines changed

5 files changed

+117
-7
lines changed

.github/workflows/main.yml

Lines changed: 113 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,128 @@ jobs:
6464
"include": [
6565
{
6666
"os": "ubuntu-latest",
67-
"swift": "latest"
67+
"swift": "5.9",
68+
"dependencies": {
69+
"swift-syntax": "509.1.1"
70+
}
71+
},
72+
{
73+
"os": "ubuntu-latest",
74+
"swift": "5.9",
75+
"dependencies": {
76+
"swift-syntax": "510.0.3"
77+
}
78+
},
79+
{
80+
"os": "ubuntu-latest",
81+
"swift": "5.9",
82+
"dependencies": {
83+
"swift-syntax": "600.0.1"
84+
}
85+
},
86+
{
87+
"os": "ubuntu-latest",
88+
"swift": "5.9",
89+
"dependencies": {
90+
"swift-syntax": "601.0.1"
91+
}
92+
},
93+
{
94+
"os": "ubuntu-latest",
95+
"swift": "6.0",
96+
"dependencies": {
97+
"swift-syntax": "509.1.1"
98+
}
99+
},
100+
{
101+
"os": "ubuntu-latest",
102+
"swift": "6.0",
103+
"dependencies": {
104+
"swift-syntax": "510.0.3"
105+
}
106+
},
107+
{
108+
"os": "ubuntu-latest",
109+
"swift": "6.0",
110+
"dependencies": {
111+
"swift-syntax": "600.0.1"
112+
}
113+
},
114+
{
115+
"os": "ubuntu-latest",
116+
"swift": "6.0",
117+
"dependencies": {
118+
"swift-syntax": "601.0.1"
119+
}
120+
},
121+
{
122+
"os": "ubuntu-latest",
123+
"swift": "6.1",
124+
"dependencies": {
125+
"swift-syntax": "509.1.1"
126+
}
127+
},
128+
{
129+
"os": "ubuntu-latest",
130+
"swift": "6.1",
131+
"dependencies": {
132+
"swift-syntax": "510.0.3"
133+
}
68134
},
69135
{
70-
"os": "macos-13",
71-
"swift": "5.9"
136+
"os": "ubuntu-latest",
137+
"swift": "6.1",
138+
"dependencies": {
139+
"swift-syntax": "600.0.1"
140+
}
141+
},
142+
{
143+
"os": "ubuntu-latest",
144+
"swift": "6.1",
145+
"dependencies": {
146+
"swift-syntax": "601.0.1"
147+
}
148+
},
149+
{
150+
"os": "ubuntu-latest",
151+
"swift": "latest"
72152
},
73153
{
74154
"os": "macos-15",
75155
"swift": "latest"
76156
}
77157
]
78158
}
159+
160+
# todo: inverestigate failure on swift 5.10
161+
# {
162+
# "os": "ubuntu-latest",
163+
# "swift": "5.10",
164+
# "dependencies": {
165+
# "swift-syntax": "509.1.1"
166+
# }
167+
# },
168+
# {
169+
# "os": "ubuntu-latest",
170+
# "swift": "5.10",
171+
# "dependencies": {
172+
# "swift-syntax": "510.0.3"
173+
# }
174+
# },
175+
# {
176+
# "os": "ubuntu-latest",
177+
# "swift": "5.10",
178+
# "dependencies": {
179+
# "swift-syntax": "600.0.1"
180+
# }
181+
# },
182+
# {
183+
# "os": "ubuntu-latest",
184+
# "swift": "5.10",
185+
# "dependencies": {
186+
# "swift-syntax": "601.0.1"
187+
# }
188+
# },
79189

80190
cocoapods-test:
81191
name: CocoaPods

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let package = Package(
2020
.plugin(name: "MetaProtocolCodable", targets: ["MetaProtocolCodable"]),
2121
],
2222
dependencies: [
23-
.package(url: "https://github.com/swiftlang/swift-syntax.git", "509.1.0"..<"601.0.0"),
23+
.package(url: "https://github.com/swiftlang/swift-syntax.git", "509.1.0"..<"602.0.0"),
2424
.package(url: "https://github.com/apple/swift-collections.git", from: "1.0.4"),
2525
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.2"),
2626
.package(url: "https://github.com/swiftlang/swift-format", from: "600.0.0"),

Package@swift-5.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let package = Package(
2020
.plugin(name: "MetaProtocolCodable", targets: ["MetaProtocolCodable"]),
2121
],
2222
dependencies: [
23-
.package(url: "https://github.com/swiftlang/swift-syntax.git", "509.1.0"..<"601.0.0"),
23+
.package(url: "https://github.com/swiftlang/swift-syntax.git", "509.1.0"..<"602.0.0"),
2424
.package(url: "https://github.com/apple/swift-collections.git", from: "1.0.4"),
2525
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.2"),
2626
.package(url: "https://github.com/swiftlang/swift-format", from: "600.0.0"),

Sources/PluginCore/Attributes/CodedAs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ package struct CodedAs: PropertyAttribute {
2424
/// the identifier to this type.
2525
var type: TypeSyntax? {
2626
return node.attributeName.as(IdentifierTypeSyntax.self)?
27-
.genericArgumentClause?.arguments.first?.argument
27+
.genericArgumentClause?.arguments.first?.argument.as(TypeSyntax.self)
2828
}
2929

3030
/// Creates a new instance with the provided node.

Sources/PluginCore/Variables/Property/PropertyVariable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ extension PropertyVariable {
163163
type.name.text == "Optional",
164164
let gArgs = type.genericArgumentClause?.arguments,
165165
gArgs.count == 1,
166-
let type = gArgs.first?.argument
166+
let type = gArgs.first?.argument.as(TypeSyntax.self)
167167
{
168168
dType = type
169169
dMethod = "\(method)IfPresent"

0 commit comments

Comments
 (0)