Skip to content

Commit 04279ce

Browse files
Nick Lefeverfacebook-github-bot
Nick Lefever
authored andcommitted
Remove RSNRU feature flag after holdout cleanup (#49146)
Summary: Pull Request resolved: #49146 Runtime Reference ShadowNode Update is enabled by default and no longer referenced in the RN holdout. This diff: - removes the feature flag - removes all references to the feature flag, enabling it - updates the unit test for RSNRU Changelog: [Internal] Reviewed By: javache Differential Revision: D69061234 fbshipit-source-id: 0dab0b5cae99e83297f34645dee58ae9b3c0dc5f
1 parent ca5ce20 commit 04279ce

22 files changed

+35
-185
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt

+1-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<d7e150b5b7f7b62f347bc417f542f2ba>>
7+
* @generated SignedSource<<f9d245ca964067e18f6f1b2cb1a9e2da>>
88
*/
99

1010
/**
@@ -268,12 +268,6 @@ public object ReactNativeFeatureFlags {
268268
@JvmStatic
269269
public fun useRawPropsJsiValue(): Boolean = accessor.useRawPropsJsiValue()
270270

271-
/**
272-
* When enabled, cloning shadow nodes within react native will update the reference held by the current JS fiber tree.
273-
*/
274-
@JvmStatic
275-
public fun useRuntimeShadowNodeReferenceUpdate(): Boolean = accessor.useRuntimeShadowNodeReferenceUpdate()
276-
277271
/**
278272
* In Bridgeless mode, should legacy NativeModules use the TurboModule system?
279273
*/

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt

+1-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<ae7503526759f8b9f1ef56207ee1cab5>>
7+
* @generated SignedSource<<f6b847d35e9cb5660c7a2de052d4ebf5>>
88
*/
99

1010
/**
@@ -60,7 +60,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
6060
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
6161
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
6262
private var useRawPropsJsiValueCache: Boolean? = null
63-
private var useRuntimeShadowNodeReferenceUpdateCache: Boolean? = null
6463
private var useTurboModuleInteropCache: Boolean? = null
6564
private var useTurboModulesCache: Boolean? = null
6665

@@ -424,15 +423,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
424423
return cached
425424
}
426425

427-
override fun useRuntimeShadowNodeReferenceUpdate(): Boolean {
428-
var cached = useRuntimeShadowNodeReferenceUpdateCache
429-
if (cached == null) {
430-
cached = ReactNativeFeatureFlagsCxxInterop.useRuntimeShadowNodeReferenceUpdate()
431-
useRuntimeShadowNodeReferenceUpdateCache = cached
432-
}
433-
return cached
434-
}
435-
436426
override fun useTurboModuleInterop(): Boolean {
437427
var cached = useTurboModuleInteropCache
438428
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<5292a5f705fc3587ee9d81cc83a79c05>>
7+
* @generated SignedSource<<e25f474cab98b16f9816544bf1a92072>>
88
*/
99

1010
/**
@@ -108,8 +108,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
108108

109109
@DoNotStrip @JvmStatic public external fun useRawPropsJsiValue(): Boolean
110110

111-
@DoNotStrip @JvmStatic public external fun useRuntimeShadowNodeReferenceUpdate(): Boolean
112-
113111
@DoNotStrip @JvmStatic public external fun useTurboModuleInterop(): Boolean
114112

115113
@DoNotStrip @JvmStatic public external fun useTurboModules(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<d904f548576348ea7a6eb58fa306faea>>
7+
* @generated SignedSource<<088a6daf49f748452959595e639529f0>>
88
*/
99

1010
/**
@@ -103,8 +103,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
103103

104104
override fun useRawPropsJsiValue(): Boolean = false
105105

106-
override fun useRuntimeShadowNodeReferenceUpdate(): Boolean = true
107-
108106
override fun useTurboModuleInterop(): Boolean = false
109107

110108
override fun useTurboModules(): Boolean = false

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt

+1-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<f2440756231f770d7240112ed2a460d8>>
7+
* @generated SignedSource<<060a74992e46d6246d335638146dd710>>
88
*/
99

1010
/**
@@ -64,7 +64,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
6464
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
6565
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
6666
private var useRawPropsJsiValueCache: Boolean? = null
67-
private var useRuntimeShadowNodeReferenceUpdateCache: Boolean? = null
6867
private var useTurboModuleInteropCache: Boolean? = null
6968
private var useTurboModulesCache: Boolean? = null
7069

@@ -468,16 +467,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
468467
return cached
469468
}
470469

471-
override fun useRuntimeShadowNodeReferenceUpdate(): Boolean {
472-
var cached = useRuntimeShadowNodeReferenceUpdateCache
473-
if (cached == null) {
474-
cached = currentProvider.useRuntimeShadowNodeReferenceUpdate()
475-
accessedFeatureFlags.add("useRuntimeShadowNodeReferenceUpdate")
476-
useRuntimeShadowNodeReferenceUpdateCache = cached
477-
}
478-
return cached
479-
}
480-
481470
override fun useTurboModuleInterop(): Boolean {
482471
var cached = useTurboModuleInteropCache
483472
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<3bb3618781161c0b6beaffcfabf0288c>>
7+
* @generated SignedSource<<06c7797870da173ddeb125c400aea36d>>
88
*/
99

1010
/**
@@ -103,8 +103,6 @@ public interface ReactNativeFeatureFlagsProvider {
103103

104104
@DoNotStrip public fun useRawPropsJsiValue(): Boolean
105105

106-
@DoNotStrip public fun useRuntimeShadowNodeReferenceUpdate(): Boolean
107-
108106
@DoNotStrip public fun useTurboModuleInterop(): Boolean
109107

110108
@DoNotStrip public fun useTurboModules(): Boolean

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp

+1-15
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<b04123b022b1f120895d027f8bc12a4e>>
7+
* @generated SignedSource<<6ccc0a90005733d3a3782e58fd901f67>>
88
*/
99

1010
/**
@@ -279,12 +279,6 @@ class ReactNativeFeatureFlagsProviderHolder
279279
return method(javaProvider_);
280280
}
281281

282-
bool useRuntimeShadowNodeReferenceUpdate() override {
283-
static const auto method =
284-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useRuntimeShadowNodeReferenceUpdate");
285-
return method(javaProvider_);
286-
}
287-
288282
bool useTurboModuleInterop() override {
289283
static const auto method =
290284
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useTurboModuleInterop");
@@ -501,11 +495,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useRawPropsJsiValue(
501495
return ReactNativeFeatureFlags::useRawPropsJsiValue();
502496
}
503497

504-
bool JReactNativeFeatureFlagsCxxInterop::useRuntimeShadowNodeReferenceUpdate(
505-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
506-
return ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate();
507-
}
508-
509498
bool JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop(
510499
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
511500
return ReactNativeFeatureFlags::useTurboModuleInterop();
@@ -667,9 +656,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
667656
makeNativeMethod(
668657
"useRawPropsJsiValue",
669658
JReactNativeFeatureFlagsCxxInterop::useRawPropsJsiValue),
670-
makeNativeMethod(
671-
"useRuntimeShadowNodeReferenceUpdate",
672-
JReactNativeFeatureFlagsCxxInterop::useRuntimeShadowNodeReferenceUpdate),
673659
makeNativeMethod(
674660
"useTurboModuleInterop",
675661
JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop),

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<141e3b288582658dac52d18b9f8fe273>>
7+
* @generated SignedSource<<2fac4fa4239357f275ffdbcb414a2652>>
88
*/
99

1010
/**
@@ -150,9 +150,6 @@ class JReactNativeFeatureFlagsCxxInterop
150150
static bool useRawPropsJsiValue(
151151
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
152152

153-
static bool useRuntimeShadowNodeReferenceUpdate(
154-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
155-
156153
static bool useTurboModuleInterop(
157154
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
158155

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<be4def74dca96760a42fe7da148a70ca>>
7+
* @generated SignedSource<<2e63280f9e95a64a17513fabcdb11eda>>
88
*/
99

1010
/**
@@ -186,10 +186,6 @@ bool ReactNativeFeatureFlags::useRawPropsJsiValue() {
186186
return getAccessor().useRawPropsJsiValue();
187187
}
188188

189-
bool ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate() {
190-
return getAccessor().useRuntimeShadowNodeReferenceUpdate();
191-
}
192-
193189
bool ReactNativeFeatureFlags::useTurboModuleInterop() {
194190
return getAccessor().useTurboModuleInterop();
195191
}

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<ba638fd2dba475cb03191963f38692b4>>
7+
* @generated SignedSource<<f38ee9e79b92ea5928702891a69b115e>>
88
*/
99

1010
/**
@@ -239,11 +239,6 @@ class ReactNativeFeatureFlags {
239239
*/
240240
RN_EXPORT static bool useRawPropsJsiValue();
241241

242-
/**
243-
* When enabled, cloning shadow nodes within react native will update the reference held by the current JS fiber tree.
244-
*/
245-
RN_EXPORT static bool useRuntimeShadowNodeReferenceUpdate();
246-
247242
/**
248243
* In Bridgeless mode, should legacy NativeModules use the TurboModule system?
249244
*/

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp

+3-21
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<3873ccb0828b6046d750f91b52011c76>>
7+
* @generated SignedSource<<267ba4fbc519b6fea9897663a9fd1f8d>>
88
*/
99

1010
/**
@@ -749,24 +749,6 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
749749
return flagValue.value();
750750
}
751751

752-
bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdate() {
753-
auto flagValue = useRuntimeShadowNodeReferenceUpdate_.load();
754-
755-
if (!flagValue.has_value()) {
756-
// This block is not exclusive but it is not necessary.
757-
// If multiple threads try to initialize the feature flag, we would only
758-
// be accessing the provider multiple times but the end state of this
759-
// instance and the returned flag value would be the same.
760-
761-
markFlagAsAccessed(40, "useRuntimeShadowNodeReferenceUpdate");
762-
763-
flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdate();
764-
useRuntimeShadowNodeReferenceUpdate_ = flagValue;
765-
}
766-
767-
return flagValue.value();
768-
}
769-
770752
bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
771753
auto flagValue = useTurboModuleInterop_.load();
772754

@@ -776,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
776758
// be accessing the provider multiple times but the end state of this
777759
// instance and the returned flag value would be the same.
778760

779-
markFlagAsAccessed(41, "useTurboModuleInterop");
761+
markFlagAsAccessed(40, "useTurboModuleInterop");
780762

781763
flagValue = currentProvider_->useTurboModuleInterop();
782764
useTurboModuleInterop_ = flagValue;
@@ -794,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
794776
// be accessing the provider multiple times but the end state of this
795777
// instance and the returned flag value would be the same.
796778

797-
markFlagAsAccessed(42, "useTurboModules");
779+
markFlagAsAccessed(41, "useTurboModules");
798780

799781
flagValue = currentProvider_->useTurboModules();
800782
useTurboModules_ = flagValue;

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<a3dd66b0308eb48a76db0c022008c431>>
7+
* @generated SignedSource<<c9b36f185334a694bb5f210aeb297fdb>>
88
*/
99

1010
/**
@@ -72,7 +72,6 @@ class ReactNativeFeatureFlagsAccessor {
7272
bool useNativeViewConfigsInBridgelessMode();
7373
bool useOptimizedEventBatchingOnAndroid();
7474
bool useRawPropsJsiValue();
75-
bool useRuntimeShadowNodeReferenceUpdate();
7675
bool useTurboModuleInterop();
7776
bool useTurboModules();
7877

@@ -86,7 +85,7 @@ class ReactNativeFeatureFlagsAccessor {
8685
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
8786
bool wasOverridden_;
8887

89-
std::array<std::atomic<const char*>, 43> accessedFeatureFlags_;
88+
std::array<std::atomic<const char*>, 42> accessedFeatureFlags_;
9089

9190
std::atomic<std::optional<bool>> commonTestFlag_;
9291
std::atomic<std::optional<bool>> disableMountItemReorderingAndroid_;
@@ -128,7 +127,6 @@ class ReactNativeFeatureFlagsAccessor {
128127
std::atomic<std::optional<bool>> useNativeViewConfigsInBridgelessMode_;
129128
std::atomic<std::optional<bool>> useOptimizedEventBatchingOnAndroid_;
130129
std::atomic<std::optional<bool>> useRawPropsJsiValue_;
131-
std::atomic<std::optional<bool>> useRuntimeShadowNodeReferenceUpdate_;
132130
std::atomic<std::optional<bool>> useTurboModuleInterop_;
133131
std::atomic<std::optional<bool>> useTurboModules_;
134132
};

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<f2527ee8120aaf0890f31a8b0f4ade39>>
7+
* @generated SignedSource<<32bc62baa718f8dffce9ff5f69ac828d>>
88
*/
99

1010
/**
@@ -187,10 +187,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
187187
return false;
188188
}
189189

190-
bool useRuntimeShadowNodeReferenceUpdate() override {
191-
return true;
192-
}
193-
194190
bool useTurboModuleInterop() override {
195191
return false;
196192
}

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h

+1-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<f11fb76af1081648c884174db67efa74>>
7+
* @generated SignedSource<<b777f67e92432fb53ce5340448ccd8b6>>
88
*/
99

1010
/**
@@ -405,15 +405,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
405405
return ReactNativeFeatureFlagsDefaults::useRawPropsJsiValue();
406406
}
407407

408-
bool useRuntimeShadowNodeReferenceUpdate() override {
409-
auto value = values_["useRuntimeShadowNodeReferenceUpdate"];
410-
if (!value.isNull()) {
411-
return value.getBool();
412-
}
413-
414-
return ReactNativeFeatureFlagsDefaults::useRuntimeShadowNodeReferenceUpdate();
415-
}
416-
417408
bool useTurboModuleInterop() override {
418409
auto value = values_["useTurboModuleInterop"];
419410
if (!value.isNull()) {

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<f60b7ae1cc777ad7d6249665603ee63a>>
7+
* @generated SignedSource<<e7a3ffaed474345d2f52ba50cf9c1261>>
88
*/
99

1010
/**
@@ -65,7 +65,6 @@ class ReactNativeFeatureFlagsProvider {
6565
virtual bool useNativeViewConfigsInBridgelessMode() = 0;
6666
virtual bool useOptimizedEventBatchingOnAndroid() = 0;
6767
virtual bool useRawPropsJsiValue() = 0;
68-
virtual bool useRuntimeShadowNodeReferenceUpdate() = 0;
6968
virtual bool useTurboModuleInterop() = 0;
7069
virtual bool useTurboModules() = 0;
7170
};

0 commit comments

Comments
 (0)