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

OSS feature flag updates #21597

Merged
merged 3 commits into from
Jun 1, 2021
Merged

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Jun 1, 2021

Supersedes #21590

  • Enable enableSuspenseLayoutEffectSemantics and enableStrictEffects for upcoming 18 release.

While enabling enableSuspenseLayoutEffectSemantics I noticed that we haven't actually wired this up within www yet, so I'll land a separate Diff to do that.

@bvaughn bvaughn requested a review from gaearon June 1, 2021 17:37
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jun 1, 2021
@@ -39,6 +38,8 @@ export const {
// On WWW, __EXPERIMENTAL__ is used for a new modern build.
// It's not used anywhere in production yet.

export const enableStrictEffects =
__DEV__ && dynamicFeatureFlags.enableStrictEffects;
Copy link
Collaborator

@sebmarkbage sebmarkbage Jun 1, 2021

Choose a reason for hiding this comment

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

In theory these __DEV__ flags shouldn't be needed since every usage of this flag should also be wrapped in __DEV__. Otherwise, when we remove the flag, we might have missed to wrap it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, they are wrapped.

This change is a follow up to this thread/suggestion:
#21590 (comment)

@sizebot
Copy link

sizebot commented Jun 1, 2021

Comparing: efbd69b...f27b230

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 +0.91% 126.00 kB 127.14 kB +0.88% 40.41 kB 40.76 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +0.89% 128.82 kB 129.96 kB +0.88% 41.35 kB 41.71 kB
facebook-www/ReactDOM-prod.classic.js = 406.15 kB 405.78 kB = 75.12 kB 75.05 kB
facebook-www/ReactDOM-prod.modern.js = 394.52 kB 394.13 kB = 73.31 kB 73.23 kB
facebook-www/ReactDOMForked-prod.classic.js = 406.15 kB 405.78 kB = 75.13 kB 75.05 kB
oss-stable/react-art/cjs/react-art.development.js +2.25% 622.11 kB 636.10 kB +1.63% 135.57 kB 137.79 kB
oss-experimental/react-art/cjs/react-art.development.js +2.17% 644.58 kB 658.56 kB +1.59% 140.23 kB 142.46 kB
oss-stable/react-reconciler/cjs/react-reconciler.development.js +2.08% 681.28 kB 695.42 kB +1.59% 145.45 kB 147.76 kB
oss-stable/react-art/umd/react-art.development.js +2.04% 723.46 kB 738.18 kB +1.48% 153.76 kB 156.04 kB
oss-experimental/react-reconciler/cjs/react-reconciler.development.js +2.01% 703.93 kB 718.07 kB +1.53% 150.08 kB 152.37 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-art/cjs/react-art.development.js +2.25% 622.11 kB 636.10 kB +1.63% 135.57 kB 137.79 kB
oss-experimental/react-art/cjs/react-art.development.js +2.17% 644.58 kB 658.56 kB +1.59% 140.23 kB 142.46 kB
oss-stable/react-reconciler/cjs/react-reconciler.development.js +2.08% 681.28 kB 695.42 kB +1.59% 145.45 kB 147.76 kB
oss-stable/react-art/umd/react-art.development.js +2.04% 723.46 kB 738.18 kB +1.48% 153.76 kB 156.04 kB
oss-experimental/react-reconciler/cjs/react-reconciler.development.js +2.01% 703.93 kB 718.07 kB +1.53% 150.08 kB 152.37 kB
oss-experimental/react-art/umd/react-art.development.js +1.97% 747.28 kB 762.00 kB +1.43% 158.52 kB 160.78 kB
oss-stable/react-dom/umd/react-dom.development.js +1.51% 986.99 kB 1,001.87 kB +1.05% 215.24 kB 217.50 kB
oss-stable/react-dom/cjs/react-dom.development.js +1.50% 939.77 kB 953.91 kB +1.03% 212.68 kB 214.88 kB
oss-experimental/react-dom/umd/react-dom.development.js +1.47% 1,012.89 kB 1,027.77 kB +1.03% 220.24 kB 222.51 kB
oss-experimental/react-dom/cjs/react-dom.development.js +1.47% 964.20 kB 978.34 kB +1.02% 217.67 kB 219.89 kB
oss-stable/react-art/cjs/react-art.production.min.js +1.45% 79.24 kB 80.38 kB +1.60% 24.65 kB 25.05 kB
oss-experimental/react-art/cjs/react-art.production.min.js +1.40% 81.62 kB 82.77 kB +1.58% 25.39 kB 25.79 kB
oss-stable/react-reconciler/cjs/react-reconciler.production.min.js +1.29% 89.67 kB 90.82 kB +1.47% 27.56 kB 27.96 kB
oss-stable/react-reconciler/cjs/react-reconciler.profiling.min.js +1.26% 95.24 kB 96.44 kB +1.36% 29.31 kB 29.71 kB
oss-experimental/react-reconciler/cjs/react-reconciler.production.min.js +1.25% 92.13 kB 93.28 kB +1.32% 28.46 kB 28.83 kB
oss-experimental/react-reconciler/cjs/react-reconciler.profiling.min.js +1.21% 99.50 kB 100.70 kB +1.09% 30.76 kB 31.10 kB
oss-stable/react-art/umd/react-art.production.min.js +0.99% 115.12 kB 116.27 kB +1.21% 35.66 kB 36.09 kB
oss-experimental/react-art/umd/react-art.production.min.js +0.97% 117.51 kB 118.65 kB +1.00% 36.57 kB 36.93 kB
oss-stable/react-dom/cjs/react-dom.production.min.js +0.91% 126.00 kB 127.14 kB +0.88% 40.41 kB 40.76 kB
oss-stable/react-dom/umd/react-dom.production.min.js +0.90% 125.99 kB 127.13 kB +0.78% 41.08 kB 41.40 kB
oss-stable/react-dom/cjs/react-dom.profiling.min.js +0.90% 131.47 kB 132.66 kB +0.85% 41.99 kB 42.35 kB
oss-stable/react-dom/umd/react-dom.profiling.min.js +0.90% 131.42 kB 132.61 kB +0.89% 42.66 kB 43.04 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +0.89% 128.82 kB 129.96 kB +0.88% 41.35 kB 41.71 kB
oss-experimental/react-dom/umd/react-dom.production.min.js +0.89% 128.78 kB 129.92 kB +0.82% 42.02 kB 42.37 kB
oss-experimental/react-dom/cjs/react-dom.profiling.min.js +0.87% 136.10 kB 137.29 kB +0.81% 43.58 kB 43.93 kB
oss-experimental/react-dom/umd/react-dom.profiling.min.js +0.87% 136.01 kB 137.20 kB +0.91% 44.17 kB 44.57 kB

Generated by 🚫 dangerJS against f27b230

@bvaughn bvaughn merged commit 6309193 into facebook:master Jun 1, 2021
@bvaughn bvaughn deleted the strict-effects-oss branch June 1, 2021 17:44
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Jun 7, 2021
Summary:
- **[0eea57724](facebook/react@0eea57724 )**: Fix typo in comment (accumlated → accumulated) ([#21637](facebook/react#21637)) //<ithinker5>//
- **[0706162ba](facebook/react@0706162ba )**: Fix typo in comment (environement → environment) ([#21635](facebook/react#21635)) //<niexq>//
- **[9d17b562b](facebook/react@9d17b562b )**: Fix typo in comment (satsify → satisfy) ([#21629](facebook/react#21629)) //<niexq>//
- **[b610fec00](facebook/react@b610fec00 )**: fix comments: expiration time -> lanes ([#21551](facebook/react#21551)) //<Shannon Feng>//
- **[cc4d24ab0](facebook/react@cc4d24ab0 )**: [Fizz] Always call flush() if it exists ([#21625](facebook/react#21625)) //<Dan Abramov>//
- **[e0d9b2899](facebook/react@e0d9b2899 )**: [Fizz] Minor Fixes for Warning Parity ([#21618](facebook/react#21618)) //<Sebastian Markbåge>//
- **[1b7b3592f](facebook/react@1b7b3592f )**: [Fizz] Implement Component Stacks in DEV for warnings ([#21610](facebook/react#21610)) //<Sebastian Markbåge>//
- **[39f007489](facebook/react@39f007489 )**: Make enableSuspenseLayoutEffectSemantics static for www ([#21617](facebook/react#21617)) //<Brian Vaughn>//
- **[8f3794276](facebook/react@8f3794276 )**: Prepare semver (`latest`) releases in CI ([#21615](facebook/react#21615)) //<Andrew Clark>//
- **[8b4201535](facebook/react@8b4201535 )**: Devtools: add feature to trigger an error boundary ([#21583](facebook/react#21583)) //<Bao Pham>//
- **[154a8cf32](facebook/react@154a8cf32 )**: Fix reference to wrong variable //<Andrew Clark>//
- **[6736a38b9](facebook/react@6736a38b9 )**: Add single source of truth for package versions ([#21608](facebook/react#21608)) //<Andrew Clark>//
- **[86715efa2](facebook/react@86715efa2 )**: Resolve the true entry point during tests ([#21505](facebook/react#21505)) //<Sebastian Markbåge>//
- **[a8a4742f1](facebook/react@a8a4742f1 )**: Convert ES6/TypeScript/CoffeeScript Tests to createRoot + act ([#21598](facebook/react#21598)) //<Sebastian Markbåge>//
- **[1d3558965](facebook/react@1d3558965 )**: Disable deferRenderPhaseUpdateToNextBatch by default ([#21605](facebook/react#21605)) //<Sebastian Markbåge>//
- **[a8964649b](facebook/react@a8964649b )**: Delete an unused field ([#21415](facebook/react#21415)) //<okmttdhr>//
- **[76f85b3e5](facebook/react@76f85b3e5 )**: Expose Fizz in stable builds ([#21602](facebook/react#21602)) //<Dan Abramov>//
- **[e16d61c30](facebook/react@e16d61c30 )**: [Offscreen] Mount/unmount layout effects ([#21386](facebook/react#21386)) //<Andrew Clark>//
- **[63091939b](facebook/react@63091939b )**: OSS feature flag updates ([#21597](facebook/react#21597)) //<Brian Vaughn>//
- **[efbd69b27](facebook/react@efbd69b27 )**:  Define global __WWW__ = true flag during www tests ([#21504](facebook/react#21504)) //<Sebastian Markbåge>//
- **[28625c6f4](facebook/react@28625c6f4 )**: Disable strict effects for legacy roots (again) ([#21591](facebook/react#21591)) //<Brian Vaughn>//
- **[3c2341416](facebook/react@3c2341416 )**: Update jest to v26 ([#21574](facebook/react#21574)) //<Sebastian Silbermann>//
- **[0d493dcda](facebook/react@0d493dcda )**: Removed _debugID field from Fiber - Issue #21558 ([#21570](facebook/react#21570)) //<Pulkit Sharma>//
- **[7841d0695](facebook/react@7841d0695 )**: Enable the updater-tracking feature flag in more builds ([#21567](facebook/react#21567)) //<Brian Vaughn>//
- **[6405efc36](facebook/react@6405efc36 )**: Enabled Profiling feature flags for OSS release ([#21565](facebook/react#21565)) //<Brian Vaughn>//

Changelog:
[General][Changed] - React Native sync for revisions 2d8d133...0eea577

jest_e2e[run_all_tests]

Reviewed By: bvaughn

Differential Revision: D28932083

fbshipit-source-id: 012c1bfb857ed59d7283334d633f1cce8ec50360
koto pushed a commit to koto/react that referenced this pull request Jun 15, 2021
Co-authored-by: Dan Abramov <dan.abramov@me.com>
@rickhanlonii
Copy link
Member

@bvaughn does this turn Strict Effects on even outside of StrictMode? It looks like for strict effects, we only check the feature flag, instead of checking the mode on the fiber?

@rickhanlonii
Copy link
Member

Oh right, I forgot about the MountLayoutDev and MountPassiveDev flags thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants