mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use an SDKRoot based Foundation framework
Summary:
When building `igios-no-extensions` with buck2 on linux, we the following analysis error:
```
When running analysis for `fbsource//fbobjc/Apps/Instagram/Instagram:InstagramNoExtensions (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)`
Caused by:
0: When running analysis for `fbsource//fbobjc/Apps/Instagram/Instagram:InstagramARVRFrameworkDylibFramework (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)`
1: When running analysis for `fbsource//fbobjc/Apps/Instagram/Instagram:InstagramDependencyPoolForLinkGroupsFramework (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)`
2: When running analysis for `fbsource//fbobjc/Libraries/FBReactKit:RCTNetInfo (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)`
3: When running analysis for `fbsource//xplat/js/RKJSModules/Libraries/NetInfo:FBReactNativeNetInfoSpecApple (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)`
4: When running analysis for `fbsource//xplat/js/react-native-github:RCTTypeSafety (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)`
5: Traceback (most recent call last):
* fbcode/buck2/prelude/apple/apple_library.bzl:48, in <module>
constructor_params, swift_providers = apple_library_rule_constructor_params_a...
* fbcode/buck2/prelude/apple/apple_library.bzl:111, in apple_library_rule_constructor_params_and_swift_providers
args = [cmd_args(get_framework_search_path_flags(ctx))],
* fbcode/buck2/prelude/apple/apple_frameworks.bzl:46, in get_framework_search_path_flags
return _get_framework_search_path_flags(_get_non_sdk_framework_directories(ct...
* fbcode/buck2/prelude/apple/apple_frameworks.bzl:59, in _get_non_sdk_framework_directories
return dedupe(filter(None, [_non_sdk_framework_directory(ctx, x) for x in fra...
* fbcode/buck2/prelude/apple/apple_frameworks.bzl:95, in _non_sdk_framework_directory
expanded_framework_path = _expand_sdk_framework_path(ctx, framework_path)
* fbcode/buck2/prelude/apple/apple_frameworks.bzl:81, in _expand_sdk_framework_path
expanded_path = expanded_path.replace(path_variable, path_value)
error: Type of parameter `new` doesn't match, expected `str`, actual `artifact`
--> fbcode/buck2/prelude/apple/apple_frameworks.bzl:81:25
|
81 | expanded_path = expanded_path.replace(path_variable, path_value)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
```
This is related to running on Linux with buck2 and how we get the framework paths for linux/pika toolchains for non SDK frameworks. However, Foundation is an SDK framework, and updating it to be as such allows us to build, both with buck1 and buck2.
Differential Revision: D38080376
fbshipit-source-id: b226c3511e3312d0bf0ddb792dbe4ca99768cad1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1e3cb91707
commit
ee4ce2df2f
@@ -600,7 +600,7 @@ rn_apple_library(
|
||||
contacts = ["oncall+react_native@xmail.facebook.com"],
|
||||
extension_api_only = True,
|
||||
frameworks = [
|
||||
"$PLATFORM_DIR/Developer/Library/Frameworks/Foundation.framework",
|
||||
"Foundation",
|
||||
],
|
||||
inherited_buck_flags = get_static_library_ios_flags(),
|
||||
labels = [
|
||||
|
||||
Reference in New Issue
Block a user