diff --git a/apple/internal/apple_framework_import.bzl b/apple/internal/apple_framework_import.bzl index 1273658ea..90544fbce 100644 --- a/apple/internal/apple_framework_import.bzl +++ b/apple/internal/apple_framework_import.bzl @@ -71,7 +71,7 @@ load( ) load( "//apple/internal/providers:apple_dynamic_framework_info.bzl", - "AppleDynamicFrameworkInfo", + "new_appledynamicframeworkinfo", ) load( "//apple/internal/providers:framework_import_bundle_info.bzl", @@ -285,7 +285,7 @@ def _apple_dynamic_framework_import_impl(ctx): # Create AppleDynamicFramework provider. framework_groups = _grouped_framework_files(framework_imports) framework_dirs_set = depset(framework_groups.keys()) - providers.append(AppleDynamicFrameworkInfo( + providers.append(new_appledynamicframeworkinfo( cc_info = cc_info, framework_dirs = framework_dirs_set, framework_files = depset(framework_imports), diff --git a/apple/internal/apple_xcframework_import.bzl b/apple/internal/apple_xcframework_import.bzl index 3881de159..c663101b7 100644 --- a/apple/internal/apple_xcframework_import.bzl +++ b/apple/internal/apple_xcframework_import.bzl @@ -46,6 +46,7 @@ load( load( "//apple/internal/providers:apple_dynamic_framework_info.bzl", "AppleDynamicFrameworkInfo", + "new_appledynamicframeworkinfo", ) load( "//apple/internal/providers:framework_import_bundle_info.bzl", @@ -517,7 +518,7 @@ def _apple_dynamic_xcframework_import_impl(ctx): providers.append(cc_info) # Create AppleDynamicFrameworkInfo provider - apple_dynamic_framework_info = AppleDynamicFrameworkInfo( + apple_dynamic_framework_info = new_appledynamicframeworkinfo( cc_info = cc_info, ) providers.append(apple_dynamic_framework_info) diff --git a/apple/internal/partials/framework_provider.bzl b/apple/internal/partials/framework_provider.bzl index 7fad4315f..776396a04 100644 --- a/apple/internal/partials/framework_provider.bzl +++ b/apple/internal/partials/framework_provider.bzl @@ -24,7 +24,7 @@ load( ) load( "//apple/internal/providers:apple_dynamic_framework_info.bzl", - "AppleDynamicFrameworkInfo", + "new_appledynamicframeworkinfo", ) def _framework_provider_partial_impl( @@ -80,7 +80,7 @@ def _framework_provider_partial_impl( ], ) - framework_provider = AppleDynamicFrameworkInfo( + framework_provider = new_appledynamicframeworkinfo( binary = binary_artifact, cc_info = wrapper_cc_info, framework_dirs = depset([absolute_framework_dir]), diff --git a/apple/internal/providers/apple_dynamic_framework_info.bzl b/apple/internal/providers/apple_dynamic_framework_info.bzl index 47f76ebb6..fa94aaff2 100644 --- a/apple/internal/providers/apple_dynamic_framework_info.bzl +++ b/apple/internal/providers/apple_dynamic_framework_info.bzl @@ -18,7 +18,7 @@ visibility([ "//apple/internal/...", ]) -AppleDynamicFrameworkInfo = provider( +_AppleDynamicFrameworkInfo = provider( doc = "Contains information about an Apple dynamic framework.", fields = { "framework_dirs": """\ @@ -36,3 +36,14 @@ into the binary. """, }, ) + +# TODO: Remove when we drop 7.x +AppleDynamicFrameworkInfo = getattr(apple_common, "AppleDynamicFramework", _AppleDynamicFrameworkInfo) + +# TODO: Remove when we drop 7.x +def new_appledynamicframeworkinfo(**kwargs): + legacy_initializer = getattr(apple_common, "new_dynamic_framework_provider", None) + if legacy_initializer: + return legacy_initializer(**kwargs) + + return AppleDynamicFrameworkInfo(**kwargs)