Skip to content

Commit

Permalink
rn_codegen: renamed src_prefix to codegen_src_prefix (#36866)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #36866

For consistency with internal build rules, rename this kwarg. This will make it easier to keep both internal and external usages consistent.

Changelog: [General][Changed] react-native-codegen: Buck-only: renamed src_prefix kwarg

Reviewed By: sammy-SC

Differential Revision: D44857745

fbshipit-source-id: 475658281a6c2846be42e130f81e23dfcae5856b
  • Loading branch information
fkgozali authored and facebook-github-bot committed Apr 11, 2023
1 parent 71506ce commit 9193c4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -769,23 +769,23 @@ rn_codegen(
name = "FBReactNativeSpec",
android_package_name = "com.facebook.fbreact.specs",
codegen_modules = True,
codegen_src_prefix = "packages/react-native/Libraries/",
ios_assume_nonnull = False,
library_labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholder",
],
native_module_spec_name = "FBReactNativeSpec",
src_prefix = "packages/react-native/Libraries/",
)

# TODO: Merge this into FBReactNativeSpec
rn_codegen(
name = "FBReactNativeComponentSpec",
codegen_components = True,
codegen_src_prefix = "packages/react-native/Libraries/",
ios_assume_nonnull = False,
library_labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholder",
],
src_prefix = "packages/react-native/Libraries/",
)

rn_apple_library(
Expand Down
12 changes: 6 additions & 6 deletions tools/build_defs/oss/rn_codegen_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def rn_codegen(
codegen_components = False,
codegen_modules = False,
library_labels = [],
src_prefix = "",
codegen_src_prefix = "",
external_spec_target = None):
if codegen_modules:
error_header = "rn_codegen(name=\"{}\")".format(name)
Expand All @@ -43,11 +43,11 @@ def rn_codegen(

spec_srcs = native.glob(
[
src_prefix + "**/Native*.js",
src_prefix + "**/Native*.ts",
codegen_src_prefix + "**/Native*.js",
codegen_src_prefix + "**/Native*.ts",
],
exclude = [
src_prefix + "**/nativeImageSource.js",
codegen_src_prefix + "**/nativeImageSource.js",
"**/__*__/**",
],
)
Expand Down Expand Up @@ -82,8 +82,8 @@ def rn_codegen(
name = "codegen_rn_components_schema_{}".format(component_spec_name),
srcs = native.glob(
[
src_prefix + "**/*NativeComponent.js",
src_prefix + "**/*NativeComponent.ts",
codegen_src_prefix + "**/*NativeComponent.js",
codegen_src_prefix + "**/*NativeComponent.ts",
],
exclude = [
"**/__*__/**",
Expand Down

0 comments on commit 9193c4f

Please sign in to comment.