Implement new feature flag system (re-land) (#42678)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42678

Changelog: [internal]

This is a re-application of https://github.com/facebook/react-native/pull/42430, which had to be reverted because of crashes in optimized builds on Android:

```
Abort Reason: terminating due to uncaught exception of type facebook::jni::JniException: java.lang.ClassNotFoundException: com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsProvider
```

The root cause of that was that that class was removed because it wasn't statically referenced from Kotlin/Java, but it was dynamically referenced from C++ (in `ReactNativeFeatureFlagsProviderHolder.cpp`).

This applies the same changes + adds `DoNotStrip` annotations for the affected class and all its methods.

Reviewed By: huntie

Differential Revision: D53122992

fbshipit-source-id: efc4d5636a3f2d39b86e9c098bff408b6688b80b
This commit is contained in:
Rubén Norte
2024-01-26 09:55:27 -08:00
committed by Facebook GitHub Bot
parent 6c4ef54708
commit 5e66f41697
73 changed files with 3140 additions and 4 deletions
+7
View File
@@ -33,6 +33,13 @@ function describe(message) {
try {
echo('Executing JavaScript tests');
describe('Test: feature flags codegen');
if (exec(`${YARN_BINARY} run featureflags-check`).code) {
echo('Failed to run featureflags check.');
exitCode = 1;
throw Error(exitCode);
}
describe('Test: eslint');
if (exec(`${YARN_BINARY} run lint`).code) {
echo('Failed to run eslint.');