Skip to content

Commit

Permalink
Rename rn_xplat_cxx_library2 to rn_apple_xplat_cxx_library
Browse files Browse the repository at this point in the history
Summary:
Rename this helper to make it explicit what it's used for. There's still more to do here to simplify these.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D41184338

fbshipit-source-id: a33d306978cb9026ebf10b00853042da4aaecd5a
  • Loading branch information
javache authored and facebook-github-bot committed Nov 15, 2022
1 parent f8f2a3e commit effbae5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
30 changes: 15 additions & 15 deletions BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ load(
"react_native_xplat_dep",
"react_native_xplat_target",
"rn_apple_library",
"rn_apple_xplat_cxx_library",
"rn_extra_build_flags",
"rn_xplat_cxx_library2",
"subdir_glob",
)
load("//tools/build_defs/third_party:yarn_defs.bzl", "yarn_workspace")
Expand Down Expand Up @@ -70,7 +70,7 @@ rn_codegen_components(
schema_target = ":codegen_rn_components_schema_rncore",
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTCxxBridge",
srcs = glob([
"React/CxxBridge/*.mm",
Expand Down Expand Up @@ -130,7 +130,7 @@ RCTCXXMODULE_PUBLIC_HEADERS = {
]
}

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTCxxModule",
srcs = glob([
"React/CxxModule/*.mm",
Expand Down Expand Up @@ -171,7 +171,7 @@ rn_xplat_cxx_library2(
],
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTCxxUtils",
srcs = glob([
"React/CxxUtils/*.mm",
Expand Down Expand Up @@ -203,7 +203,7 @@ rn_xplat_cxx_library2(
],
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTCxxLogUtils",
srcs = glob([
"React/CxxLogUtils/*.mm",
Expand Down Expand Up @@ -362,7 +362,7 @@ REACT_COMPONENTVIEWS_BASE_FILES = [
"React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm",
]

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "ReactInternal",
srcs = glob(
[
Expand Down Expand Up @@ -462,7 +462,7 @@ rn_xplat_cxx_library2(
],
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTFabric",
srcs = glob(
[
Expand Down Expand Up @@ -689,7 +689,7 @@ rn_apple_library(
# Ideally, each component view gets its own target, and each target uses react_fabric_component_plugin_provider.
# For each component, an app can import the base component view, or an app-specific subclass.
# i.e. Apps depend on "ImageView" target for RCTImageComponentView.h, and "FBReactImageView" target for FBReactImageComponentView.h
rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTFabricComponentViewsBase",
srcs = glob(REACT_COMPONENTVIEWS_BASE_FILES),
header_namespace = "",
Expand Down Expand Up @@ -1201,7 +1201,7 @@ rn_apple_library(
],
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTText",
srcs = glob([
"Libraries/Text/**/*.m",
Expand Down Expand Up @@ -1307,7 +1307,7 @@ rn_apple_library(
],
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTWrapper",
srcs = glob([
"Libraries/Wrapper/*.m",
Expand Down Expand Up @@ -1339,7 +1339,7 @@ rn_xplat_cxx_library2(
],
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTWrapperExample",
srcs = glob([
"Libraries/Wrapper/Example/*.m",
Expand Down Expand Up @@ -1372,7 +1372,7 @@ rn_xplat_cxx_library2(
],
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTSurfaceHostingComponent",
srcs = glob([
"Libraries/SurfaceHostingComponent/**/*.m",
Expand Down Expand Up @@ -1407,7 +1407,7 @@ rn_xplat_cxx_library2(
],
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTSurfaceBackedComponent",
srcs = glob([
"Libraries/SurfaceBackedComponent/**/*.m",
Expand Down Expand Up @@ -1443,7 +1443,7 @@ rn_xplat_cxx_library2(
],
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTMapView_RNHeader",
header_namespace = "",
exported_headers = {
Expand All @@ -1458,7 +1458,7 @@ rn_xplat_cxx_library2(
],
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RCTWebPerformance",
srcs = glob([
"Libraries/WebPerformance/**/*.cpp",
Expand Down
9 changes: 5 additions & 4 deletions packages/rn-tester/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ load(
"react_fabric_component_plugin_provider",
"react_module_plugin_providers",
"rn_apple_library",
"rn_apple_xplat_cxx_library",
"rn_extra_build_flags",
"rn_xplat_cxx_library2",
"rn_xplat_cxx_library",
)
load("//tools/build_defs/third_party:yarn_defs.bzl", "yarn_workspace")

Expand Down Expand Up @@ -208,7 +209,7 @@ fb_xplat_resource(
],
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "RNTesterBundleBinary",
srcs = ["//xplat/configurations/buck/apple/common_files:dummy.c"],
deps = [":RNTesterBundleAssetCatalog"],
Expand Down Expand Up @@ -289,7 +290,7 @@ rn_apple_library(
],
)

rn_xplat_cxx_library2(
rn_apple_xplat_cxx_library(
name = "NativeComponentExample",
plugins_only = True,
srcs = glob(
Expand Down Expand Up @@ -326,7 +327,7 @@ rn_xplat_cxx_library2(
],
)

rn_xplat_cxx_library2(
rn_xplat_cxx_library(
name = "NativeCxxModuleExample",
srcs = glob(["NativeCxxModuleExample/*.cpp"]),
header_namespace = "",
Expand Down
2 changes: 1 addition & 1 deletion tools/build_defs/oss/rn_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def rn_xplat_cxx_library(
**kwargs
)

rn_xplat_cxx_library2 = rn_xplat_cxx_library
rn_apple_xplat_cxx_library = rn_xplat_cxx_library

# Example: react_native_target('java/com/facebook/react/common:common')
def react_native_target(path):
Expand Down

3 comments on commit effbae5

@Pranav-yadav
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still more to do here to simplify these.

For example?
@javache

PS: Happy to help with any refactoring or cleaning stuff..

@javache
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is primarily an internal configuration to address, where we need to map the open-source buck primitives to internal tooling.

@Pranav-yadav
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

Please sign in to comment.