Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Remove SwiftInfo.module_name, it was deprecated a while ago.
Browse files Browse the repository at this point in the history
RELNOTES: None
PiperOrigin-RevId: 348027802
  • Loading branch information
thomasvl authored and swiple-rules-gardener committed Dec 17, 2020
1 parent 875de9f commit 789b20b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
11 changes: 0 additions & 11 deletions swift/internal/providers.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down
7 changes: 0 additions & 7 deletions swift/internal/swift_module_alias.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 789b20b

Please sign in to comment.