Skip to content
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

Bump swift-syntax to 5.10.0 #20

Merged
merged 4 commits into from
Mar 4, 2024
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
10 changes: 5 additions & 5 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing",
"state" : {
"revision" : "59b663f68e69f27a87b45de48cb63264b8194605",
"version" : "1.15.1"
"revision" : "5b0c434778f2c1a4c9b5ebdb8682b28e84dd69bd",
"version" : "1.15.4"
}
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax.git",
"location" : "https://github.com/apple/swift-syntax",
"state" : {
"revision" : "6ad4ea24b01559dde0773e3d091f1b9e36175036",
"version" : "509.0.2"
"revision" : "08a2f0a9a30e0f705f79c9cfaca1f68b71bdc775",
"version" : "510.0.0"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"),
.package(url: "https://github.com/apple/swift-syntax", "509.0.0"..<"511.0.0"),
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.15.0"),
],
targets: [
Expand Down
4 changes: 2 additions & 2 deletions Tests/MacroTestingTests/DictionaryStorageMacroTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ final class DictionaryStorageMacroTests: BaseTestCase {
} expansion: {
"""
struct Point {
var x: Int = 1 {
var x: Int {
get {
_storage["x", default: 1] as! Int
}
set {
_storage["x"] = newValue
}
}
var y: Int = 2 {
var y: Int {
get {
_storage["y", default: 2] as! Int
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/MacroTestingTests/MacroExamples/AddBlocker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ public struct AddBlocker: ExpressionMacro {
context.diagnose(diag)
}

return result.asProtocol(FreestandingMacroExpansionSyntax.self)!.argumentList.first!.expression
return result.asProtocol(FreestandingMacroExpansionSyntax.self)!.arguments.first!.expression
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public enum FontLiteralMacro: ExpressionMacro {
in context: some MacroExpansionContext
) throws -> ExprSyntax {
let argList = replaceFirstLabel(
of: node.argumentList,
of: node.arguments,
with: "fontLiteralName"
)
return ".init(\(argList))"
Expand Down
2 changes: 1 addition & 1 deletion Tests/MacroTestingTests/MacroExamples/StringifyMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public enum StringifyMacro: ExpressionMacro {
of node: some FreestandingMacroExpansionSyntax,
in context: some MacroExpansionContext
) -> ExprSyntax {
guard let argument = node.argumentList.first?.expression else {
guard let argument = node.arguments.first?.expression else {
fatalError("compiler bug: the macro does not have any arguments")
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/MacroTestingTests/MacroExamples/URLMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public enum URLMacro: ExpressionMacro {
of node: some FreestandingMacroExpansionSyntax,
in context: some MacroExpansionContext
) throws -> ExprSyntax {
guard let argument = node.argumentList.first?.expression,
guard let argument = node.arguments.first?.expression,
let segments = argument.as(StringLiteralExprSyntax.self)?.segments,
segments.count == 1,
case .stringSegment(let literalSegment)? = segments.first
Expand Down
2 changes: 1 addition & 1 deletion Tests/MacroTestingTests/MacroExamples/WarningMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public enum WarningMacro: ExpressionMacro {
of node: some FreestandingMacroExpansionSyntax,
in context: some MacroExpansionContext
) throws -> ExprSyntax {
guard let firstElement = node.argumentList.first,
guard let firstElement = node.arguments.first,
let stringLiteral = firstElement.expression
.as(StringLiteralExprSyntax.self),
stringLiteral.segments.count == 1,
Expand Down
2 changes: 1 addition & 1 deletion Tests/MacroTestingTests/ObservableMacroTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ final class ObservableMacroTests: XCTestCase {
}
}

var isHappy: Bool = true {
var isHappy: Bool {
get {
_registrar.beginAccess(\.isHappy)
defer {
Expand Down
Loading