Skip to content

ci: added more swift versions and swift-syntax coveragae #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 113 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,128 @@ 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",
"swift": "latest"
}
]
}

# 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
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion Sources/PluginCore/Attributes/CodedAs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading