From bcfc2c4b6c304a6a8930f4bd403f65e5d81cf57e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 6 Jan 2023 11:12:17 -0500 Subject: [PATCH] Update SwiftSyntax (#4673) * Exclude `Documentation.docc` when building SwiftSyntax * Remove references to `.stringInterpolationAnchor` Co-authored-by: JP Simard --- Package.resolved | 2 +- Package.swift | 2 +- .../SwiftLintFramework/Rules/Style/ClosureSpacingRule.swift | 3 +-- bazel/SwiftSyntax.BUILD | 5 ++++- bazel/repos.bzl | 6 +++--- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Package.resolved b/Package.resolved index 842dc3e0ca..da2710d757 100644 --- a/Package.resolved +++ b/Package.resolved @@ -32,7 +32,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-syntax.git", "state" : { - "revision" : "a2d31e8880224f5a619f24bf58c122836faf99ff" + "revision" : "60e2097fa967e3bd0a2c3f08b1c672865c1f1d60" } }, { diff --git a/Package.swift b/Package.swift index 29e6d54df0..1c37ed792f 100644 --- a/Package.swift +++ b/Package.swift @@ -30,7 +30,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.2.0")), - .package(url: "https://github.com/apple/swift-syntax.git", revision: "a2d31e8880224f5a619f24bf58c122836faf99ff"), + .package(url: "https://github.com/apple/swift-syntax.git", revision: "60e2097fa967e3bd0a2c3f08b1c672865c1f1d60"), .package(url: "https://github.com/jpsim/SourceKitten.git", .upToNextMinor(from: "0.33.1")), .package(url: "https://github.com/jpsim/Yams.git", from: "5.0.1"), .package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", from: "0.9.0"), diff --git a/Source/SwiftLintFramework/Rules/Style/ClosureSpacingRule.swift b/Source/SwiftLintFramework/Rules/Style/ClosureSpacingRule.swift index b7e658a02b..d40c024743 100644 --- a/Source/SwiftLintFramework/Rules/Style/ClosureSpacingRule.swift +++ b/Source/SwiftLintFramework/Rules/Style/ClosureSpacingRule.swift @@ -224,8 +224,7 @@ private extension TokenSyntax { .postfixQuestionMark, .rightParen, .rightSquareBracket, - .semicolon, - .stringInterpolationAnchor + .semicolon ] if case .newlines = trailingTrivia.first { return true diff --git a/bazel/SwiftSyntax.BUILD b/bazel/SwiftSyntax.BUILD index 6678446c90..9b81feca5b 100644 --- a/bazel/SwiftSyntax.BUILD +++ b/bazel/SwiftSyntax.BUILD @@ -11,7 +11,10 @@ cc_library( swift_library( name = "SwiftSyntax", - srcs = glob(["Sources/SwiftSyntax/**/*.swift"]), + srcs = glob( + ["Sources/SwiftSyntax/**/*.swift"], + exclude = ["Sources/SwiftSyntax/Documentation.docc/**"], + ), module_name = "SwiftSyntax", private_deps = ["_CSwiftSyntax"], ) diff --git a/bazel/repos.bzl b/bazel/repos.bzl index ee26cd24e4..a9a62bd7a0 100644 --- a/bazel/repos.bzl +++ b/bazel/repos.bzl @@ -19,10 +19,10 @@ def swiftlint_repos(): http_archive( name = "com_github_apple_swift_syntax", - sha256 = "854c5cefdcfdb30fdc758db9cdad37fb9b78bb6897300e2ceb92f7be41bbe044", # SwiftSyntax sha256 + sha256 = "18f910a68c06e7a11f813b781704bff2ef6ebd676ccc7506dc479fc95811a64f", # SwiftSyntax sha256 build_file = "@SwiftLint//bazel:SwiftSyntax.BUILD", - strip_prefix = "swift-syntax-a2d31e8880224f5a619f24bf58c122836faf99ff", - url = "https://github.com/apple/swift-syntax/archive/a2d31e8880224f5a619f24bf58c122836faf99ff.tar.gz", + strip_prefix = "swift-syntax-60e2097fa967e3bd0a2c3f08b1c672865c1f1d60", + url = "https://github.com/apple/swift-syntax/archive/60e2097fa967e3bd0a2c3f08b1c672865c1f1d60.tar.gz", ) http_archive(