From 9e72bb65c174fde7be8cb4c9efb3f532644acfe4 Mon Sep 17 00:00:00 2001 From: Elton Gao Date: Wed, 18 Sep 2024 20:38:19 -0400 Subject: [PATCH] Remove swift info provider creation inside hmap rule (#919) Last place that touched this code is on https://github.com/bazel-ios/rules_ios/pull/906where I thought it's important to construct SwiftInfo provider for hmap and add compilation context to pass the failing test. However that leads to a new [issue](https://github.com/bazel-ios/rules_ios/pull/916#pullrequestreview-2310552165) with `docc_archive` rule with latest `rules_apple/rules_swift`. We realized it's actually not needed to provide any SwiftInfo provider at all or it will "confuse" rules_swift/apple (since newer version starts to rely more on clang info from Swift info itself instead `apple_common.Objc`). Removing this also have the original failing test passing. Tests done: - [x] my own downstream repo still builds fine. - [x] CI is green Will squash before merge as it contains already merged commits --- rules/hmap.bzl | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/rules/hmap.bzl b/rules/hmap.bzl index 9af2bf0d..8e26bb7b 100644 --- a/rules/hmap.bzl +++ b/rules/hmap.bzl @@ -78,22 +78,12 @@ def _make_headermap_impl(ctx): cc_info_provider = CcInfo( compilation_context = compilation_context, ) - swift_info_provider = swift_common.create_swift_info( - modules = [swift_common.create_module( - name = ctx.attr.name, - clang = swift_common.create_clang_module( - compilation_context = compilation_context, - module_map = None, - ), - )], - ) providers = [ DefaultInfo( files = depset([headermap]), ), apple_common.new_objc_provider(), cc_info_provider, - swift_info_provider, ] hdrs_lists = [l for l in hdrs_lists if l]