Skip to content

Commit

Permalink
Add pfh labels to targets
Browse files Browse the repository at this point in the history
Summary:
While it would be better to be able to do all of the ownership metadata at the Buck macro level, that proved to be more work than expected.

This diff adds the corresponding pfh label to all targets in `xplat/js/react-native-github` that have a Supermodule label. Once the migration is complete the Supermodules labels will be able to be removed.

Reviewed By: cortinico

Differential Revision: D35221544

fbshipit-source-id: d87d5e266dfb5e6ee087251dc34dff5db299bbaf
  • Loading branch information
chris-olszewski authored and facebook-github-bot committed Mar 30, 2022
1 parent 0353852 commit ceae48c
Show file tree
Hide file tree
Showing 142 changed files with 666 additions and 161 deletions.
57 changes: 49 additions & 8 deletions BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ rn_xplat_cxx_library2(
# it's linked in your app, transparently use it".
labels = [
"depslint_never_remove",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode() + [
Expand Down Expand Up @@ -154,7 +155,10 @@ rn_xplat_cxx_library2(
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
],
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode() + ["-DWITH_FBSYSTRACE=1"],
visibility = ["PUBLIC"],
deps = [
Expand Down Expand Up @@ -191,7 +195,10 @@ rn_xplat_cxx_library2(
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
],
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode(),
visibility = ["PUBLIC"],
deps = [
Expand All @@ -216,7 +223,10 @@ rn_xplat_cxx_library2(
),
contacts = ["[email protected]"],
fbobjc_enable_exceptions = True,
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode(),
visibility = ["PUBLIC"],
deps = [
Expand Down Expand Up @@ -419,6 +429,7 @@ rn_xplat_cxx_library2(
labels = [
"depslint_never_add",
"depslint_never_remove", # Some old NativeModule still relies on +load unfortunately.
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
platform_preprocessor_flags = [(
Expand Down Expand Up @@ -509,6 +520,7 @@ rn_xplat_cxx_library2(
header_path_prefix = "React",
labels = [
"disable_plugins_only_validation",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
plugins = [
Expand Down Expand Up @@ -591,7 +603,10 @@ rn_apple_library(
"$PLATFORM_DIR/Developer/Library/Frameworks/Foundation.framework",
],
inherited_buck_flags = get_static_library_ios_flags(),
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode(),
reexport_all_header_dependencies = True,
deps = [
Expand Down Expand Up @@ -661,6 +676,7 @@ rn_apple_library(
contacts = ["[email protected]"],
labels = [
"disable_plugins_only_validation",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
plugins = [react_fabric_component_plugin_provider("Image", "RCTImageCls")],
Expand Down Expand Up @@ -691,7 +707,10 @@ rn_xplat_cxx_library2(
},
compiler_flags = ["-Wall"],
contacts = ["[email protected]"],
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
visibility = ["PUBLIC"],
deps = [
"//xplat/js/react-native-github:RCTImage",
Expand Down Expand Up @@ -720,7 +739,10 @@ rn_library(
"Libraries/Components/Switch/SwitchSchema.js",
],
),
labels = ["supermodule:xplat/default/public.react_native.core"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.core",
],
visibility = ["PUBLIC"],
deps = [
"//xplat/js:node_modules__abort_19controller",
Expand Down Expand Up @@ -757,7 +779,10 @@ rn_codegen(
android_package_name = "com.facebook.fbreact.specs",
codegen_modules = True,
ios_assume_nonnull = False,
library_labels = ["supermodule:xplat/default/public.react_native.infra"],
library_labels = [
"supermodule:xplat/default/public.react_native.infra",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
],
native_module_spec_name = "FBReactNativeSpec",
src_prefix = "Libraries/",
)
Expand All @@ -767,7 +792,10 @@ rn_codegen(
name = "FBReactNativeComponentSpec",
codegen_components = True,
ios_assume_nonnull = False,
library_labels = ["supermodule:xplat/default/public.react_native.infra"],
library_labels = [
"supermodule:xplat/default/public.react_native.infra",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
],
src_prefix = "Libraries/",
)

Expand Down Expand Up @@ -801,6 +829,7 @@ rn_apple_library(
"depslint_never_remove", # Some old NativeModule still relies on +load unfortunately.
"disable_plugins_only_validation",
"extension_api_allow_unsafe_unavailable_usages",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
plugins =
Expand Down Expand Up @@ -850,6 +879,7 @@ rn_apple_library(
labels = [
"depslint_never_remove", # Some old NativeModule still relies on +load unfortunately.
"disable_plugins_only_validation",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
plugins =
Expand Down Expand Up @@ -908,6 +938,7 @@ rn_apple_library(
"depslint_never_remove", # Some old NativeModule still relies on +load unfortunately.
"disable_plugins_only_validation",
"extension_api_allow_unsafe_unavailable_usages",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
plugins =
Expand Down Expand Up @@ -955,6 +986,7 @@ rn_apple_library(
"depslint_never_remove", # Some old NativeModule still relies on +load unfortunately.
"disable_plugins_only_validation",
"extension_api_allow_unsafe_unavailable_usages",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
plugins =
Expand Down Expand Up @@ -1006,6 +1038,7 @@ rn_apple_library(
"depslint_never_remove", # Some old NativeModule still relies on +load unfortunately.
"disable_plugins_only_validation",
"extension_api_allow_unsafe_unavailable_usages",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
plugins =
Expand Down Expand Up @@ -1086,6 +1119,7 @@ rn_apple_library(
"depslint_never_remove", # Some old NativeModule still relies on +load unfortunately.
"disable_plugins_only_validation",
"extension_api_allow_unsafe_unavailable_usages",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
plugins =
Expand Down Expand Up @@ -1219,6 +1253,7 @@ rn_xplat_cxx_library2(
],
labels = [
"depslint_never_remove", # Some old NativeModule still relies on +load unfortunately.
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode(),
Expand Down Expand Up @@ -1251,6 +1286,7 @@ rn_apple_library(
labels = [
"depslint_never_remove",
"disable_plugins_only_validation",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
plugins = react_module_plugin_providers(
Expand Down Expand Up @@ -1291,6 +1327,7 @@ rn_xplat_cxx_library2(
],
labels = [
"depslint_never_remove", # Some old NativeModule still relies on +load unfortunately.
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode(),
Expand Down Expand Up @@ -1323,6 +1360,7 @@ rn_xplat_cxx_library2(
],
labels = [
"depslint_never_remove",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode(),
Expand Down Expand Up @@ -1357,6 +1395,7 @@ rn_xplat_cxx_library2(
],
labels = [
"depslint_never_remove",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode(),
Expand Down Expand Up @@ -1392,6 +1431,7 @@ rn_xplat_cxx_library2(
],
labels = [
"depslint_never_remove",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode(),
Expand All @@ -1413,6 +1453,7 @@ rn_xplat_cxx_library2(
"React/RCTConvert+CoreLocation.h": RCTVIEWS_PATH + "RCTConvert+CoreLocation.h",
},
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
visibility = [
Expand Down
5 changes: 4 additions & 1 deletion IntegrationTests/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ rn_library(
"websocket_integration_test_server.js",
],
),
labels = ["supermodule:xplat/default/public.react_native.tests"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.tests",
],
skip_processors = True,
visibility = ["PUBLIC"],
deps = [
Expand Down
5 changes: 4 additions & 1 deletion Libraries/FBLazyVector/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ fb_apple_library(
enable_exceptions = False,
extension_api_only = True,
frameworks = [],
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
link_whole = False,
visibility = ["PUBLIC"],
)
5 changes: 4 additions & 1 deletion Libraries/RCTRequired/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ fb_apple_library(
contacts = ["[email protected]"],
extension_api_only = True,
frameworks = ["Foundation"],
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
)
1 change: 1 addition & 0 deletions React/CoreModules/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ rn_apple_library(
labels = [
"depslint_never_remove", # Some old NativeModule still relies on +load unfortunately.
"disable_plugins_only_validation",
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
link_whole = True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ rn_android_library(
name = "network",
srcs = glob(["**/*.java"]),
autoglob = False,
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
visibility = [
"PUBLIC",
],
Expand Down
5 changes: 4 additions & 1 deletion ReactAndroid/src/androidTest/js/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ rn_library(
"**/*.md",
],
),
labels = ["supermodule:xplat/default/public.react_native.tests"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.tests",
],
skip_processors = True,
visibility = ["PUBLIC"],
deps = [
Expand Down
5 changes: 4 additions & 1 deletion ReactAndroid/src/main/java/com/facebook/debug/holder/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ rn_android_library(
name = "holder",
srcs = glob(["*.java"]),
autoglob = False,
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
visibility = [
"PUBLIC",
],
Expand Down
5 changes: 4 additions & 1 deletion ReactAndroid/src/main/java/com/facebook/debug/tags/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ rn_android_library(
name = "tags",
srcs = glob(["*.java"]),
autoglob = False,
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
visibility = [
"PUBLIC",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ rn_android_library(
name = "hermes_samplingprofiler",
srcs = ["HermesSamplingProfiler.java"],
autoglob = False,
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
visibility = ["PUBLIC"],
deps = [
react_native_dep("java/com/facebook/proguard/annotations:annotations"),
Expand All @@ -34,7 +37,10 @@ rn_xplat_cxx_library(
compiler_flags_enable_exceptions = True, # TODO: is this necessary?
compiler_flags_enable_rtti = True, # TODO: is this necessary?
fbandroid_allow_jni_merging = True,
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
platforms = ANDROID,
soname = "libjsijniprofiler.$(ext)",
visibility = [
Expand Down
5 changes: 4 additions & 1 deletion ReactAndroid/src/main/java/com/facebook/react/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ rn_android_library(
srcs = glob(["*.java"]),
autoglob = False,
is_androidx = True,
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
provided_deps = [
react_native_dep("third-party/android/androidx:annotation"),
react_native_dep("third-party/android/androidx:appcompat"),
Expand Down
5 changes: 4 additions & 1 deletion ReactAndroid/src/main/java/com/facebook/react/animated/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ rn_android_library(
]),
autoglob = False,
is_androidx = True,
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
provided_deps = [
react_native_dep("third-party/android/androidx:annotation"),
react_native_dep("third-party/android/androidx:core"),
Expand Down
10 changes: 8 additions & 2 deletions ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ rn_android_library(
),
autoglob = False,
is_androidx = True,
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
proguard_config = "reactnative.pro",
provided_deps = [
react_native_dep("third-party/android/androidx:annotation"),
Expand Down Expand Up @@ -68,7 +71,10 @@ rn_android_library(
srcs = glob(INTERFACES),
autoglob = False,
is_androidx = True,
labels = ["supermodule:xplat/default/public.react_native.infra"],
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholde",
"supermodule:xplat/default/public.react_native.infra",
],
proguard_config = "reactnative.pro",
provided_deps = [
react_native_dep("third-party/android/androidx:annotation"),
Expand Down
Loading

0 comments on commit ceae48c

Please sign in to comment.