Skip to content

Commit

Permalink
remove exported_deps from apple_rules_impl_utility for apple_test in …
Browse files Browse the repository at this point in the history
…iOS folder

Summary:
In this diff, we remove additional `exported_deps` fields definition of `apple_test` rule in `apple_rules_impl_utility` files safely.

# Why
D66373121 removed an explicit definition of `exported_deps` field for `apple_test` rule. However, `apple_test_extra_attrs` appends another `exported_deps` field in `apple_rules_impl_utility`. We need to remove it to completely disable `exported_deps` usage of `apple_test` rule.

#buildall-fbobjc

Reviewed By: rmaz

Differential Revision: D68099893

fbshipit-source-id: d8e5ec941a79053349bbf9a881a80c37c1e49928
  • Loading branch information
Bin Yu authored and facebook-github-bot committed Jan 17, 2025
1 parent 8aaadeb commit ddf17fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions prelude/apple/apple_rules_impl_utility.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ def apple_test_extra_attrs():
# Expected by `apple_bundle`, for `apple_test` this field is always None.
"binary": attrs.option(attrs.dep(), default = None),
"enable_library_evolution": attrs.option(attrs.bool(), default = None),
# FIXME(T206479753): we should remove exported_deps on apple_test
"exported_deps": attrs.list(attrs.dep(), default = []),
# The resulting test bundle should have .xctest extension.
"extension": attrs.string(),
"extra_xcode_sources": attrs.list(attrs.source(allow_directory = True), default = []),
Expand Down
2 changes: 1 addition & 1 deletion prelude/cxx/cxx_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ def cxx_library_parameterized(ctx: AnalysisContext, impl_params: CxxRuleConstruc
providers.append(get_java_packaging_info(ctx, non_exported_deps + exported_deps))

if impl_params.generate_providers.java_global_code_info:
providers.append(propagate_global_code_info(ctx, ctx.attrs.deps + ctx.attrs.exported_deps))
providers.append(propagate_global_code_info(ctx, ctx.attrs.deps + getattr(ctx.attrs, "exported_deps", [])))

# TODO(T107163344) this shouldn't be in cxx_library itself, use overlays to remove it.
if impl_params.generate_providers.android_packageable_info:
Expand Down

0 comments on commit ddf17fa

Please sign in to comment.