Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix provider type checking for AppleDynamicFrameworkProvider migration #2453

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apple/internal/ios_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1656,7 +1656,9 @@ def _ios_dynamic_framework_impl(ctx):

additional_providers = []
for provider in providers:
if type(provider) == "AppleDynamicFramework":
# HACK: this should be updated so we do not need to dynamically check the provider instance.
# See: https://github.com/bazelbuild/bazel/issues/22095
if hasattr(provider, "framework_files"):
# Make the ObjC provider using the framework_files depset found
# in the AppleDynamicFramework provider. This is to make the
# ios_dynamic_framework usable as a dependency in swift_library
Expand Down
4 changes: 3 additions & 1 deletion apple/internal/macos_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3273,7 +3273,9 @@ def _macos_dynamic_framework_impl(ctx):

additional_providers = []
for provider in providers:
if type(provider) == "AppleDynamicFramework":
# HACK: this should be updated so we do not need to dynamically check the provider instance.
# See: https://github.com/bazelbuild/bazel/issues/22095
if hasattr(provider, "framework_files"):
# Make the ObjC provider using the framework_files depset found
# in the AppleDynamicFramework provider. This is to make the
# macos_dynamic_framework usable as a dependency in swift_library
Expand Down
4 changes: 3 additions & 1 deletion apple/internal/tvos_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,9 @@ def _tvos_dynamic_framework_impl(ctx):
providers = processor_result.providers
additional_providers = []
for provider in providers:
if type(provider) == "AppleDynamicFramework":
# HACK: this should be updated so we do not need to dynamically check the provider instance.
# See: https://github.com/bazelbuild/bazel/issues/22095
if hasattr(provider, "framework_files"):
# Make the ObjC provider using the framework_files depset found
# in the AppleDynamicFramework provider. This is to make the
# tvos_dynamic_framework usable as a dependency in swift_library
Expand Down
4 changes: 3 additions & 1 deletion apple/internal/visionos_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,9 @@ def _visionos_dynamic_framework_impl(ctx):
providers = processor_result.providers
additional_providers = []
for provider in providers:
if type(provider) == "AppleDynamicFramework":
# HACK: this should be updated so we do not need to dynamically check the provider instance.
# See: https://github.com/bazelbuild/bazel/issues/22095
if hasattr(provider, "framework_files"):
# Make the ObjC provider using the framework_files depset found
# in the AppleDynamicFramework provider. This is to make the
# visionos_dynamic_framework usable as a dependency in swift_library
Expand Down
6 changes: 4 additions & 2 deletions apple/internal/watchos_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,9 @@ def _watchos_dynamic_framework_impl(ctx):
providers = processor_result.providers
additional_providers = []
for provider in providers:
if type(provider) == "AppleDynamicFramework":
# HACK: this should be updated so we do not need to dynamically check the provider instance.
# See: https://github.com/bazelbuild/bazel/issues/22095
if hasattr(provider, "framework_files"):
# Make the ObjC provider using the framework_files depset found
# in the AppleDynamicFramework provider. This is to make the
# watchos_dynamic_framework usable as a dependency in swift_library
Expand Down Expand Up @@ -1851,7 +1853,7 @@ This attribute is deprecated, please use `extensions` instead.
doc = """
In case of single-target watchOS app, a list of watchOS application extensions to include in the final watch app bundle.

In case of an extension-based watchOS app, a list with a single element,
In case of an extension-based watchOS app, a list with a single element,
the watchOS 2 `watchos_extension` that is required to be bundled within a watchOS 2 app.
""",
),
Expand Down