diff --git a/BUILD b/BUILD index 23d9b29112..6176354af0 100644 --- a/BUILD +++ b/BUILD @@ -99,7 +99,7 @@ swift_library( ":Yams.wrapper", "@swiftlint_com_github_scottrhoyt_swifty_text_table//:SwiftyTextTable", ] + select({ - "@platforms//os:linux": ["@com_github_krzyzanowskim_cryptoswift//:CryptoSwift"], + "@platforms//os:linux": ["@swiftlint_com_github_krzyzanowskim_cryptoswift//:CryptoSwift"], "//conditions:default": [":DyldWarningWorkaround"], }), ) @@ -110,7 +110,7 @@ swift_library( module_name = "YamsWrapper", visibility = ["//visibility:private"], deps = [ - "@sourcekitten_com_github_jpsim_yams//:Yams", + "@com_github_jpsim_yams//:Yams", ], ) @@ -154,7 +154,7 @@ swift_library( ":SwiftLintBuiltInRules", ":SwiftLintCore", ":SwiftLintExtraRules", - "@com_github_johnsundell_collectionconcurrencykit//:CollectionConcurrencyKit", + "@swiftlint_com_github_johnsundell_collectionconcurrencykit//:CollectionConcurrencyKit", ], ) @@ -166,7 +166,7 @@ swift_binary( visibility = ["//visibility:public"], deps = [ ":SwiftLintFramework", - "@sourcekitten_com_github_apple_swift_argument_parser//:ArgumentParser", + "@com_github_apple_swift_argument_parser//:ArgumentParser", "@swiftlint_com_github_scottrhoyt_swifty_text_table//:SwiftyTextTable", ], ) @@ -179,7 +179,7 @@ swift_binary( visibility = ["//visibility:public"], deps = [ ":SwiftLintFramework", - "@sourcekitten_com_github_apple_swift_argument_parser//:ArgumentParser", + "@com_github_apple_swift_argument_parser//:ArgumentParser", ], ) diff --git a/MODULE.bazel b/MODULE.bazel index 6f91a72ba3..31c22c5ef1 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -5,23 +5,23 @@ module( repo_name = "SwiftLint", ) -bazel_dep(name = "apple_support", version = "1.16.0", repo_name = "build_bazel_apple_support") +bazel_dep(name = "apple_support", version = "1.21.1", repo_name = "build_bazel_apple_support") bazel_dep(name = "bazel_skylib", version = "1.7.1") -bazel_dep(name = "platforms", version = "0.0.10") +bazel_dep(name = "platforms", version = "0.0.11") bazel_dep(name = "rules_apple", version = "4.0.1", repo_name = "build_bazel_rules_apple") bazel_dep(name = "rules_cc", version = "0.1.1") bazel_dep(name = "rules_shell", version = "0.4.0", repo_name = "build_bazel_rules_shell") bazel_dep(name = "rules_swift", version = "2.8.1", max_compatibility_level = 3, repo_name = "build_bazel_rules_swift") bazel_dep(name = "sourcekitten", version = "0.37.2", repo_name = "com_github_jpsim_sourcekitten") -bazel_dep(name = "swift_argument_parser", version = "1.3.1.2", repo_name = "sourcekitten_com_github_apple_swift_argument_parser") +bazel_dep(name = "swift_argument_parser", version = "1.5.0", repo_name = "com_github_apple_swift_argument_parser") bazel_dep(name = "swift-syntax", version = "601.0.1.1", repo_name = "SwiftSyntax") -bazel_dep(name = "yams", version = "6.0.1", repo_name = "sourcekitten_com_github_jpsim_yams") +bazel_dep(name = "yams", version = "6.0.1", repo_name = "com_github_jpsim_yams") swiftlint_repos = use_extension("//bazel:repos.bzl", "swiftlint_repos_bzlmod") use_repo( swiftlint_repos, - "com_github_johnsundell_collectionconcurrencykit", - "com_github_krzyzanowskim_cryptoswift", + "swiftlint_com_github_johnsundell_collectionconcurrencykit", + "swiftlint_com_github_krzyzanowskim_cryptoswift", "swiftlint_com_github_scottrhoyt_swifty_text_table", ) diff --git a/Package.resolved b/Package.resolved index dc9f55cbd6..f191f6b728 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/jpsim/SourceKitten.git", "state" : { - "revision" : "eb6656ed26bdef967ad8d07c27e2eab34dc582f2", - "version" : "0.37.0" + "revision" : "731ffe6a35344a19bab00cdca1c952d5b4fee4d8", + "version" : "0.37.2" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-argument-parser.git", "state" : { - "revision" : "41982a3656a71c768319979febd796c6fd111d5c", - "version" : "1.5.0" + "revision" : "011f0c765fb46d9cac61bca19be0527e99c98c8b", + "version" : "1.5.1" } }, { @@ -68,8 +68,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/jpsim/Yams.git", "state" : { - "revision" : "b4b8042411dc7bbb696300a34a4bf3ba1b7ad19b", - "version" : "5.3.1" + "revision" : "7568d1c6c63a094405afb32264c57dc4e1435835", + "version" : "6.0.1" } } ], diff --git a/Package.swift b/Package.swift index db70ee7211..fabb7d323a 100644 --- a/Package.swift +++ b/Package.swift @@ -32,10 +32,10 @@ let package = Package( .plugin(name: "SwiftLintCommandPlugin", targets: ["SwiftLintCommandPlugin"]), ], dependencies: [ - .package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMajor(from: "1.2.1")), + .package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMajor(from: "1.5.1")), .package(url: "https://github.com/swiftlang/swift-syntax.git", exact: "601.0.1"), - .package(url: "https://github.com/jpsim/SourceKitten.git", .upToNextMajor(from: "0.37.0")), - .package(url: "https://github.com/jpsim/Yams.git", .upToNextMajor(from: "5.3.0")), + .package(url: "https://github.com/jpsim/SourceKitten.git", .upToNextMajor(from: "0.37.2")), + .package(url: "https://github.com/jpsim/Yams.git", .upToNextMajor(from: "6.0.1")), .package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", .upToNextMajor(from: "0.9.0")), .package(url: "https://github.com/JohnSundell/CollectionConcurrencyKit.git", .upToNextMajor(from: "0.2.0")), .package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .upToNextMajor(from: "1.8.4")), diff --git a/bazel/SWXMLHash.BUILD b/bazel/SWXMLHash.BUILD new file mode 100644 index 0000000000..42d6233a58 --- /dev/null +++ b/bazel/SWXMLHash.BUILD @@ -0,0 +1,11 @@ +load( + "@build_bazel_rules_swift//swift:swift.bzl", + "swift_library", +) + +swift_library( + name = "SWXMLHash", + srcs = glob(["Source/**/*.swift"]), + module_name = "SWXMLHash", + visibility = ["//visibility:public"], +) diff --git a/bazel/SwiftArgumentParser.BUILD b/bazel/SwiftArgumentParser.BUILD new file mode 100644 index 0000000000..7db3aee8db --- /dev/null +++ b/bazel/SwiftArgumentParser.BUILD @@ -0,0 +1,17 @@ +load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") + +swift_library( + name = "ArgumentParserToolInfo", + srcs = glob(["Sources/ArgumentParserToolInfo/**/*.swift"]), + module_name = "ArgumentParserToolInfo", +) + +swift_library( + name = "ArgumentParser", + srcs = glob(["Sources/ArgumentParser/**/*.swift"]), + module_name = "ArgumentParser", + visibility = ["//visibility:public"], + deps = [ + ":ArgumentParserToolInfo", + ], +) diff --git a/bazel/repos.bzl b/bazel/repos.bzl index 9101418a2f..760d8aded9 100644 --- a/bazel/repos.bzl +++ b/bazel/repos.bzl @@ -5,9 +5,9 @@ def swiftlint_repos(bzlmod = False): if not bzlmod: http_archive( name = "com_github_jpsim_sourcekitten", - sha256 = "38d62bf1114c878a017f1c685ff7e98413390591c93f354a16ed751a8b0bf87f", - strip_prefix = "SourceKitten-0.37.1", - url = "https://github.com/jpsim/SourceKitten/releases/download/0.37.1/SourceKitten-0.37.1.tar.gz", + sha256 = "604d2e5e547ef4280c959760cba0c9bd9be759c9555796cf7a73d9e1c9bcfc90", + strip_prefix = "SourceKitten-0.37.2", + url = "https://github.com/jpsim/SourceKitten/releases/download/0.37.2/SourceKitten-0.37.2.tar.gz", ) http_archive( @@ -18,24 +18,24 @@ def swiftlint_repos(bzlmod = False): ) http_archive( - name = "sourcekitten_com_github_apple_swift_argument_parser", - url = "https://github.com/apple/swift-argument-parser/archive/refs/tags/1.3.1.tar.gz", - sha256 = "4d964f874b251abc280ee28f0f187de3c13a6122a9561524f66a10768ca2d837", - build_file = "@com_github_jpsim_sourcekitten//bazel:SwiftArgumentParser.BUILD", - strip_prefix = "swift-argument-parser-1.3.1", + name = "com_github_apple_swift_argument_parser", + url = "https://github.com/apple/swift-argument-parser/archive/refs/tags/1.5.0.tar.gz", + build_file = "@SwiftLint//bazel:SwiftArgumentParser.BUILD", + sha256 = "946a4cf7bdd2e4f0f8b82864c56332238ba3f0a929c6d1a15f55affdb10634e6", + strip_prefix = "swift-argument-parser-1.5.0", ) http_archive( - name = "sourcekitten_com_github_jpsim_yams", + name = "com_github_jpsim_yams", url = "https://github.com/jpsim/Yams/releases/download/6.0.1/Yams-6.0.1.tar.gz", sha256 = "76afe79db05acb0eda4910e0b9da6a8562ad6139ac317daa747cd829beb93b9e", strip_prefix = "Yams-6.0.1", ) http_archive( - name = "sourcekitten_com_github_drmohundro_SWXMLHash", + name = "com_github_drmohundro_SWXMLHash", url = "https://github.com/drmohundro/SWXMLHash/archive/refs/tags/7.0.2.tar.gz", - build_file = "@com_github_jpsim_sourcekitten//bazel:SWXMLHash.BUILD", + build_file = "@SwiftLint//bazel:SWXMLHash.BUILD", sha256 = "d7d600f062d6840b037fc1fb2ac3afce7a1c43ae430d78e22d7bd6f8e02cfc9d", strip_prefix = "SWXMLHash-7.0.2", ) @@ -49,7 +49,7 @@ def swiftlint_repos(bzlmod = False): ) http_archive( - name = "com_github_johnsundell_collectionconcurrencykit", + name = "swiftlint_com_github_johnsundell_collectionconcurrencykit", sha256 = "9083fe6f8b4f820bfb5ef5c555b31953116f158ec113e94c6406686e78da34aa", build_file = "@SwiftLint//bazel:CollectionConcurrencyKit.BUILD", strip_prefix = "CollectionConcurrencyKit-0.2.0", @@ -57,7 +57,7 @@ def swiftlint_repos(bzlmod = False): ) http_archive( - name = "com_github_krzyzanowskim_cryptoswift", + name = "swiftlint_com_github_krzyzanowskim_cryptoswift", sha256 = "69b23102ff453990d03aff4d3fabd172d0667b2b3ed95730021d60a0f8d50d14", build_file = "@SwiftLint//bazel:CryptoSwift.BUILD", strip_prefix = "CryptoSwift-1.8.4",