Skip to content

Commit

Permalink
Remove swift info provider creation inside hmap rule (#919)
Browse files Browse the repository at this point in the history
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](#916 (review))
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
  • Loading branch information
gyfelton authored Sep 19, 2024
1 parent b5efa1f commit 9e72bb6
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions rules/hmap.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 9e72bb6

Please sign in to comment.