Skip to content

Commit

Permalink
Merge pull request #88 from Matejkob/bump-swift-syntax
Browse files Browse the repository at this point in the history
Bump swift-syntax to support 5.10
  • Loading branch information
Matejkob committed Mar 5, 2024
2 parents 36617f2 + 553584a commit 2a11a34
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Examples/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax.git",
"location" : "https://github.com/apple/swift-syntax",
"state" : {
"revision" : "74203046135342e4a4a627476dd6caf8b28fe11b",
"version" : "509.0.0"
"revision" : "08a2f0a9a30e0f705f79c9cfaca1f68b71bdc775",
"version" : "510.0.0"
}
}
],
Expand Down
6 changes: 3 additions & 3 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax.git",
"location" : "https://github.com/apple/swift-syntax",
"state" : {
"revision" : "74203046135342e4a4a627476dd6caf8b28fe11b",
"version" : "509.0.0"
"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 @@ -21,7 +21,7 @@ let package = Package(
dependencies: [
.package(
url: "https://github.com/apple/swift-syntax",
"509.0.0"..<"510.0.0"
"509.0.0" ..< "511.0.0"
)
],
targets: [
Expand Down
7 changes: 7 additions & 0 deletions Sources/SpyableMacro/Diagnostics/SpyableNoteMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@ enum SpyableNoteMessage: String, NoteMessage {
}
}

#if canImport(SwiftSyntax510)
/// Unique identifier for each note message, aligning with the corresponding diagnostic message for clarity.
var noteID: MessageID {
MessageID(domain: "SpyableMacro", id: rawValue + "NoteMessage")
}
#else
/// Unique identifier for each note message, aligning with the corresponding diagnostic message for clarity.
var fixItID: MessageID {
MessageID(domain: "SpyableMacro", id: rawValue + "NoteMessage")
}
#endif
}

0 comments on commit 2a11a34

Please sign in to comment.