From 5167ae9ddde9c663e193da0bb1bb4b83073dded7 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Mon, 30 Nov 2020 11:51:00 -0800 Subject: [PATCH] Stop computing transitive_generated_headers. RELNOTES: None PiperOrigin-RevId: 344857866 --- swift/internal/providers.bzl | 21 --------------------- test/generated_header_tests.bzl | 12 ------------ 2 files changed, 33 deletions(-) diff --git a/swift/internal/providers.bzl b/swift/internal/providers.bzl index 996c25440..484d0b000 100644 --- a/swift/internal/providers.bzl +++ b/swift/internal/providers.bzl @@ -54,10 +54,6 @@ arguments passed to specific compilation actions. "transitive_defines": """\ `Depset` of `string`s. The transitive `defines` specified for the library that propagated this provider and all of its dependencies. -""", - "transitive_generated_headers": """\ -`Depset` of `File`s. The transitive generated header files that can be used by -Objective-C sources to interop with the transitive Swift libraries. """, "transitive_modules": """\ `Depset` of values returned from `swift_common.create_module`. The transitive @@ -331,7 +327,6 @@ def create_swift_info( """ defines_set = sets.make() - generated_headers = [] for module in modules: swift_module = module.swift if not swift_module: @@ -343,14 +338,6 @@ def create_swift_info( sets.make(swift_module.defines), ) - # If this is both a Swift and a Clang module, then the header in its - # compilation context is its Swift generated header. - clang_module = module.clang - if clang_module: - generated_headers.extend( - clang_module.compilation_context.headers.to_list(), - ) - defines = sets.to_list(defines_set) # TODO(b/149999519): Remove the legacy `module_name`. @@ -361,13 +348,9 @@ def create_swift_info( module_name = modules[0].name transitive_defines = [] - transitive_generated_headers = [] transitive_modules = [] for swift_info in swift_infos: transitive_defines.append(swift_info.transitive_defines) - transitive_generated_headers.append( - swift_info.transitive_generated_headers, - ) transitive_modules.append(swift_info.transitive_modules) return SwiftInfo( @@ -376,9 +359,5 @@ def create_swift_info( module_name = module_name, swift_version = swift_version, transitive_defines = depset(defines, transitive = transitive_defines), - transitive_generated_headers = depset( - generated_headers, - transitive = transitive_generated_headers, - ), transitive_modules = depset(modules, transitive = transitive_modules), ) diff --git a/test/generated_header_tests.bzl b/test/generated_header_tests.bzl index 939d3e983..4ea5f1b4a 100644 --- a/test/generated_header_tests.bzl +++ b/test/generated_header_tests.bzl @@ -70,18 +70,6 @@ def generated_header_test_suite(): target_under_test = "@build_bazel_rules_swift//test/fixtures/generated_header:auto_header", ) - # Verify that the generated header is propagated in `SwiftInfo`. - generate_header_and_module_map_provider_test( - name = "{}_automatically_named_header_is_propagated".format(name), - expected_files = [ - "test/fixtures/generated_header/auto_header-Swift.h", - ], - field = "transitive_generated_headers", - provider = "SwiftInfo", - tags = [name], - target_under_test = "@build_bazel_rules_swift//test/fixtures/generated_header:auto_header", - ) - # Verify that the generated module map is propagated in `apple_common.Objc`. # TODO(b/148604334): Enable this when it analyzes correctly on all platforms. # generate_header_and_module_map_provider_test(