Skip to content

Commit 6802eb9

Browse files
javachemeta-codesync[bot]
authored andcommitted
Move RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION to its only consumer (facebook#55528)
Summary: Pull Request resolved: facebook#55528 Move the RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION define from RCTDefines.h to RCTDevSettings.mm, which is its only consumer. This removes a __has_include dependency from the shared header, making RCTDefines.h usable as a standalone lightweight target without pulling in RCTPackagerConnection.h. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D93018381 fbshipit-source-id: bff276bb788197bb59a7f4626cc355d85a8dea87
1 parent 5ee695a commit 6802eb9

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

packages/react-native/React/Base/RCTDefines.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,6 @@
9595
#define RCT_DEV_MENU RCT_DEV
9696
#endif
9797

98-
#ifndef RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION
99-
#if RCT_DEV && (__has_include("RCTPackagerConnection.h") || __has_include(<React/RCTPackagerConnection.h>))
100-
#define RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION 1
101-
#else
102-
#define RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION 0
103-
#endif
104-
#endif
105-
10698
#if RCT_DEV
10799
#define RCT_IF_DEV(...) __VA_ARGS__
108100
#else

packages/react-native/React/CoreModules/RCTDevSettings.mm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@
3636
#import <React/RCTPackagerConnection.h>
3737
#endif
3838

39+
#ifndef RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION
40+
#if RCT_DEV && (__has_include("RCTPackagerConnection.h") || __has_include(<React/RCTPackagerConnection.h>))
41+
#define RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION 1
42+
#else
43+
#define RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION 0
44+
#endif
45+
#endif
46+
3947
#if RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION
4048
#import <React/RCTPackagerClient.h>
4149
#endif

0 commit comments

Comments
 (0)