Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align React Native OSS/Test Feature Flags #28677

Merged
merged 1 commit into from
Mar 29, 2024
Merged

Conversation

yungsters
Copy link
Contributor

Summary

Makes a few changes to align React Native feature flags for open source and internal test renderer configurations.

  • Enable enableSchedulingProfiler for profiling builds.
  • Align ReactFeatureFlags.test-renderer.native.js (with ReactFeatureFlags.native-fb.js).
    • Enable enableUseMemoCacheHook.
    • Enable enableFizzExternalRuntime.
    • Disable alwaysThrottleRetries.

How did you test this change?

Ran the following successfully:

$ yarn test
$ yarn flow native
$ yarn flow fabric

export const enableDeferRootSchedulingToMicrotask = false;

export const enableAsyncActions = true;

export const alwaysThrottleRetries = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw, i think if this is true and working we should keep it true to prevent any regressions that would sneak in before we can land the flag in the main fbsource bundle.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would feel better about that if I had confidence in the timeline with which we could enable this internally. However, I don't have that, and I would be worried about the possibility that tests are written against the current (non-final) behavior.

Copy link
Contributor Author

@yungsters yungsters Mar 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other words... testing something that we'll never ship (in its current state) is worse to me than testing something that is currently in production (even if it is something we want to move away from eventually).

@react-sizebot
Copy link

Comparing: 23b32d3...e7db8ea

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 177.14 kB 177.14 kB = 55.06 kB 55.06 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 172.96 kB 172.96 kB = 53.92 kB 53.92 kB
facebook-www/ReactDOM-prod.classic.js = 592.88 kB 592.88 kB = 104.01 kB 104.01 kB
facebook-www/ReactDOM-prod.modern.js = 574.57 kB 574.57 kB = 101.03 kB 101.03 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-profiling.js +2.72% 331.06 kB 340.07 kB +1.90% 58.08 kB 59.18 kB
react-native/implementations/ReactFabric-profiling.js +2.40% 328.62 kB 336.52 kB +1.79% 57.41 kB 58.43 kB
react-native/implementations/ReactNativeRenderer-profiling.js +2.33% 338.13 kB 346.02 kB +1.71% 59.11 kB 60.12 kB
test_utils/ReactAllWarnings.js Deleted 65.18 kB 0.00 kB Deleted 16.30 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-profiling.js +2.72% 331.06 kB 340.07 kB +1.90% 58.08 kB 59.18 kB
react-native/implementations/ReactFabric-profiling.js +2.40% 328.62 kB 336.52 kB +1.79% 57.41 kB 58.43 kB
react-native/implementations/ReactNativeRenderer-profiling.js +2.33% 338.13 kB 346.02 kB +1.71% 59.11 kB 60.12 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-dev.js +1.64% 947.88 kB 963.47 kB +1.09% 188.03 kB 190.08 kB
react-native/implementations/ReactFabric-dev.js +1.43% 972.26 kB 986.17 kB +0.77% 194.94 kB 196.44 kB
react-native/implementations/ReactNativeRenderer-dev.js +1.41% 987.16 kB 1,001.07 kB +0.79% 198.64 kB 200.21 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-prod.js +0.32% 315.27 kB 316.29 kB +0.18% 55.61 kB 55.71 kB
test_utils/ReactAllWarnings.js Deleted 65.18 kB 0.00 kB Deleted 16.30 kB 0.00 kB

Generated by 🚫 dangerJS against e7db8ea

@yungsters
Copy link
Contributor Author

I'm validating this internally with D55534399 before merging.

@yungsters yungsters merged commit 425f72b into facebook:main Mar 29, 2024
38 checks passed
@yungsters yungsters deleted the flags branch March 29, 2024 19:47
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
## Summary

Makes a few changes to align React Native feature flags for open source
and internal test renderer configurations.

* Enable `enableSchedulingProfiler` for profiling builds.
* Align `ReactFeatureFlags.test-renderer.native.js` (with
`ReactFeatureFlags.native-fb.js`).
  * Enable `enableUseMemoCacheHook`.
  * Enable `enableFizzExternalRuntime`.
  * Disable `alwaysThrottleRetries`.

## How did you test this change?

Ran the following successfully:

```
$ yarn test
$ yarn flow native
$ yarn flow fabric
```
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
## Summary

Makes a few changes to align React Native feature flags for open source
and internal test renderer configurations.

* Enable `enableSchedulingProfiler` for profiling builds.
* Align `ReactFeatureFlags.test-renderer.native.js` (with
`ReactFeatureFlags.native-fb.js`).
  * Enable `enableUseMemoCacheHook`.
  * Enable `enableFizzExternalRuntime`.
  * Disable `alwaysThrottleRetries`.

## How did you test this change?

Ran the following successfully:

```
$ yarn test
$ yarn flow native
$ yarn flow fabric
```

DiffTrain build for commit 425f72b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants