diff --git a/swift/internal/providers.bzl b/swift/internal/providers.bzl index a12cd53f5..8a6425a1e 100644 --- a/swift/internal/providers.bzl +++ b/swift/internal/providers.bzl @@ -33,15 +33,6 @@ library that directly propagated this provider. "direct_modules": """\ `List` of values returned from `swift_common.create_module`. The modules (both Swift and C/Objective-C) emitted by the library that propagated this provider. -""", - "module_name": """\ -`String`. The name of the Swift module represented by the target that directly -propagated this provider. - -This field will be equal to the explicitly assigned module name (if present); -otherwise, it will be equal to the autogenerated module name. - -This field is deprecated; use `direct_modules` instead. """, "swift_version": """\ `String`. The version of the Swift language that was used when compiling the @@ -346,8 +337,6 @@ def create_swift_info( return SwiftInfo( direct_defines = defines, direct_modules = modules, - # TODO(b/149999519): Remove the legacy `module_name`. - module_name = modules[0].name if len(modules) == 1 else None, swift_version = swift_version, transitive_defines = depset(defines, transitive = transitive_defines), transitive_modules = depset(modules, transitive = transitive_modules), diff --git a/swift/internal/swift_module_alias.bzl b/swift/internal/swift_module_alias.bzl index 927daab86..05eb449ca 100644 --- a/swift/internal/swift_module_alias.bzl +++ b/swift/internal/swift_module_alias.bzl @@ -34,13 +34,6 @@ def _swift_module_alias_impl(ctx): for module in dep[SwiftInfo].direct_modules } - # TODO(b/149999519): remove the support for SwiftInfo.module_name that - # didn't have any direct_modules. - for dep in deps: - swift_info = dep[SwiftInfo] - if not swift_info.direct_modules and swift_info.module_name: - module_mapping[swift_info.module_name] = dep.label - module_name = ctx.attr.module_name if not module_name: module_name = swift_common.derive_module_name(ctx.label)