From a5867e4e3c8209328af599a461008dcf59135b75 Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Tue, 1 Oct 2024 15:58:05 -0500 Subject: [PATCH 1/3] Remove more references to `swift.bzl` It will be going away in the future. Signed-off-by: Brentley Jones --- README.md | 4 ++-- .../com_github_apple_swift_argument_parser/BUILD.overlay | 2 +- third_party/com_github_apple_swift_atomics/BUILD.overlay | 4 ++-- .../com_github_apple_swift_collections/BUILD.overlay | 5 +---- .../com_github_apple_swift_docc_symbolkit/BUILD.overlay | 2 +- third_party/com_github_apple_swift_log/BUILD.overlay | 5 +---- third_party/com_github_apple_swift_nio/BUILD.overlay | 4 ++-- .../com_github_apple_swift_nio_extras/BUILD.overlay | 5 +---- third_party/com_github_apple_swift_nio_http2/BUILD.overlay | 5 +---- third_party/com_github_apple_swift_nio_ssl/BUILD.overlay | 4 ++-- .../BUILD.overlay | 5 +---- third_party/com_github_apple_swift_protobuf/BUILD.overlay | 7 ++----- third_party/com_github_grpc_grpc_swift/BUILD.overlay | 6 +++--- 13 files changed, 20 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 85a1062a8..b20618a47 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you run into any problems with these rules, please Create a simple CLI that can run on macOS, Linux, or Windows: ```bzl -load("@build_bazel_rules_swift//swift:swift.bzl", "swift_binary") +load("@build_bazel_rules_swift//swift:swift_binary.bzl", "swift_binary") swift_binary( name = "cli", @@ -29,7 +29,7 @@ Create a single library target that can be used by other targets in your build: ```bzl -load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") +load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") swift_library( name = "MyLibrary", diff --git a/third_party/com_github_apple_swift_argument_parser/BUILD.overlay b/third_party/com_github_apple_swift_argument_parser/BUILD.overlay index 7db3aee8d..40a6c0a9e 100644 --- a/third_party/com_github_apple_swift_argument_parser/BUILD.overlay +++ b/third_party/com_github_apple_swift_argument_parser/BUILD.overlay @@ -1,4 +1,4 @@ -load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") +load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") swift_library( name = "ArgumentParserToolInfo", diff --git a/third_party/com_github_apple_swift_atomics/BUILD.overlay b/third_party/com_github_apple_swift_atomics/BUILD.overlay index daf04e60d..809f8b2eb 100644 --- a/third_party/com_github_apple_swift_atomics/BUILD.overlay +++ b/third_party/com_github_apple_swift_atomics/BUILD.overlay @@ -1,8 +1,8 @@ load( - "@build_bazel_rules_swift//swift:swift.bzl", + "@build_bazel_rules_swift//swift:swift_interop_hint.bzl", "swift_interop_hint", - "swift_library", ) +load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") swift_library( name = "Atomics", diff --git a/third_party/com_github_apple_swift_collections/BUILD.overlay b/third_party/com_github_apple_swift_collections/BUILD.overlay index 9038e1a89..8ac6aaa71 100644 --- a/third_party/com_github_apple_swift_collections/BUILD.overlay +++ b/third_party/com_github_apple_swift_collections/BUILD.overlay @@ -1,7 +1,4 @@ -load( - "@build_bazel_rules_swift//swift:swift.bzl", - "swift_library", -) +load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") swift_library( name = "Collections", diff --git a/third_party/com_github_apple_swift_docc_symbolkit/BUILD.overlay b/third_party/com_github_apple_swift_docc_symbolkit/BUILD.overlay index 573a8ec7a..164df7c9f 100644 --- a/third_party/com_github_apple_swift_docc_symbolkit/BUILD.overlay +++ b/third_party/com_github_apple_swift_docc_symbolkit/BUILD.overlay @@ -1,4 +1,4 @@ -load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") +load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") swift_library( name = "SymbolKit", diff --git a/third_party/com_github_apple_swift_log/BUILD.overlay b/third_party/com_github_apple_swift_log/BUILD.overlay index 31885365a..76d5e4893 100644 --- a/third_party/com_github_apple_swift_log/BUILD.overlay +++ b/third_party/com_github_apple_swift_log/BUILD.overlay @@ -1,7 +1,4 @@ -load( - "@build_bazel_rules_swift//swift:swift.bzl", - "swift_library", -) +load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") swift_library( name = "Logging", diff --git a/third_party/com_github_apple_swift_nio/BUILD.overlay b/third_party/com_github_apple_swift_nio/BUILD.overlay index ebd14f7a6..792a26701 100644 --- a/third_party/com_github_apple_swift_nio/BUILD.overlay +++ b/third_party/com_github_apple_swift_nio/BUILD.overlay @@ -1,8 +1,8 @@ load( - "@build_bazel_rules_swift//swift:swift.bzl", + "@build_bazel_rules_swift//swift:swift_interop_hint.bzl", "swift_interop_hint", - "swift_library", ) +load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") cc_library( name = "CNIOAtomics", diff --git a/third_party/com_github_apple_swift_nio_extras/BUILD.overlay b/third_party/com_github_apple_swift_nio_extras/BUILD.overlay index 258116e52..dc05bb361 100644 --- a/third_party/com_github_apple_swift_nio_extras/BUILD.overlay +++ b/third_party/com_github_apple_swift_nio_extras/BUILD.overlay @@ -1,7 +1,4 @@ -load( - "@build_bazel_rules_swift//swift:swift.bzl", - "swift_library", -) +load( "@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") swift_library( name = "NIOExtras", diff --git a/third_party/com_github_apple_swift_nio_http2/BUILD.overlay b/third_party/com_github_apple_swift_nio_http2/BUILD.overlay index 95a2c316e..3427fa41c 100644 --- a/third_party/com_github_apple_swift_nio_http2/BUILD.overlay +++ b/third_party/com_github_apple_swift_nio_http2/BUILD.overlay @@ -1,7 +1,4 @@ -load( - "@build_bazel_rules_swift//swift:swift.bzl", - "swift_library", -) +load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") swift_library( name = "NIOHPACK", diff --git a/third_party/com_github_apple_swift_nio_ssl/BUILD.overlay b/third_party/com_github_apple_swift_nio_ssl/BUILD.overlay index 2ac93ab88..90dc52f7d 100644 --- a/third_party/com_github_apple_swift_nio_ssl/BUILD.overlay +++ b/third_party/com_github_apple_swift_nio_ssl/BUILD.overlay @@ -1,8 +1,8 @@ load( - "@build_bazel_rules_swift//swift:swift.bzl", + "@build_bazel_rules_swift//swift:swift_interop_hint.bzl", "swift_interop_hint", - "swift_library", ) +load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") swift_library( name = "NIOSSL", diff --git a/third_party/com_github_apple_swift_nio_transport_services/BUILD.overlay b/third_party/com_github_apple_swift_nio_transport_services/BUILD.overlay index 781946876..218735f37 100644 --- a/third_party/com_github_apple_swift_nio_transport_services/BUILD.overlay +++ b/third_party/com_github_apple_swift_nio_transport_services/BUILD.overlay @@ -1,7 +1,4 @@ -load( - "@build_bazel_rules_swift//swift:swift.bzl", - "swift_library", -) +load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") swift_library( name = "NIOTransportServices", diff --git a/third_party/com_github_apple_swift_protobuf/BUILD.overlay b/third_party/com_github_apple_swift_protobuf/BUILD.overlay index 3578b99d5..8fe34573e 100644 --- a/third_party/com_github_apple_swift_protobuf/BUILD.overlay +++ b/third_party/com_github_apple_swift_protobuf/BUILD.overlay @@ -1,8 +1,5 @@ -load( - "@build_bazel_rules_swift//swift:swift.bzl", - "swift_binary", - "swift_library", -) +load("@build_bazel_rules_swift//swift:swift_binary.bzl", "swift_binary") +load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") swift_library( name = "SwiftProtobuf", diff --git a/third_party/com_github_grpc_grpc_swift/BUILD.overlay b/third_party/com_github_grpc_grpc_swift/BUILD.overlay index 38228b04f..8fb8b0e2e 100644 --- a/third_party/com_github_grpc_grpc_swift/BUILD.overlay +++ b/third_party/com_github_grpc_grpc_swift/BUILD.overlay @@ -1,9 +1,9 @@ +load("@build_bazel_rules_swift//swift:swift_binary.bzl", "swift_binary") load( - "@build_bazel_rules_swift//swift:swift.bzl", - "swift_binary", + "@build_bazel_rules_swift//swift:swift_interop_hint.bzl", "swift_interop_hint", - "swift_library", ) +load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library") cc_library( name = "CGRPCZlib", From aed40259af7acdcf590590cdb06cab7617bc99c9 Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Tue, 1 Oct 2024 16:00:53 -0500 Subject: [PATCH 2/3] More Signed-off-by: Brentley Jones --- proto/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/BUILD b/proto/BUILD index 2d02c7326..89175ed05 100644 --- a/proto/BUILD +++ b/proto/BUILD @@ -71,6 +71,6 @@ bzl_library( ":swift_proto_compiler", ":swift_proto_library", ":swift_proto_library_group", - "//swift", + "//swift:providers.bzl", ], ) From 8aef02112d68b61ab4c7c1faf116ddcbf9253340 Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Thu, 3 Oct 2024 10:10:43 -0500 Subject: [PATCH 3/3] More Signed-off-by: Brentley Jones --- test/BUILD | 4 ++-- test/fixtures/BUILD | 5 ++++- test/rules/BUILD | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/BUILD b/test/BUILD index 65f9de483..3fffc0839 100644 --- a/test/BUILD +++ b/test/BUILD @@ -80,11 +80,11 @@ bzl_library( name = "swift_bzl_macro", srcs = ["swift_bzl_macro.bzl"], visibility = ["//visibility:private"], - deps = ["//swift"], + deps = ["//swift:providers"], ) bzl_test( name = "swift_bzl_test", src = "swift_bzl_macro.bzl", - deps = ["//swift"], + deps = ["//swift:providers"], ) diff --git a/test/fixtures/BUILD b/test/fixtures/BUILD index 30dddad83..1d71c446e 100644 --- a/test/fixtures/BUILD +++ b/test/fixtures/BUILD @@ -14,5 +14,8 @@ bzl_library( bzl_library( name = "common", srcs = ["common.bzl"], - deps = ["@build_bazel_rules_swift//swift"], + deps = [ + "//swift:providers", + "//swift:swift_clang_module_aspect", + ], ) diff --git a/test/rules/BUILD b/test/rules/BUILD index 23fc989ec..05ee64fcc 100644 --- a/test/rules/BUILD +++ b/test/rules/BUILD @@ -5,7 +5,7 @@ package(default_visibility = ["//test:__subpackages__"]) bzl_library( name = "swift_library_artifact_collector", srcs = ["swift_library_artifact_collector.bzl"], - deps = ["@build_bazel_rules_swift//swift"], + deps = ["@build_bazel_rules_swift//swift:providers"], ) exports_files(["swift_shell_runner.sh.template"])