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

Run Placeholder tests in persistent mode, too #15013

Merged
merged 5 commits into from
Mar 9, 2019

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Mar 5, 2019

I screwed up a few months ago when I converted the Suspense placeholder tests to use test renderer instead of noop renderer — I forgot that we were using noop renderer because it supports both mutation and persistent mode. This PR corrects that mistake by converting them back to the noop renderer. This exposed bugs in our persistent implementation. (We don't use Suspense in persistent mode anywhere yet, but it's what Fabric will use.)

This indicates we should stop using test renderer for our internal React tests, and that we should probably be running all our tests in both modes by default. (I also found a bug related to profiler in persistent mode.) But I'll leave that for a follow up.

@acdlite acdlite changed the title Persistent placeholder tests Run Placeholder tests in persistent mode, too Mar 5, 2019
@acdlite acdlite force-pushed the persistent-placeholder-tests branch 2 times, most recently from cd9f366 to 0c725b7 Compare March 5, 2019 02:20
@sizebot
Copy link

sizebot commented Mar 6, 2019

ReactDOM: size: -0.0%, gzip: -0.0%

Details of bundled changes.

Comparing: 1e3b619...9182e16

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js -0.1% -0.0% 775.58 KB 775.1 KB 176.45 KB 176.43 KB UMD_DEV
react-dom.production.min.js -0.0% -0.0% 104.89 KB 104.88 KB 34.06 KB 34.05 KB UMD_PROD
react-dom.profiling.min.js -0.0% -0.0% 107.9 KB 107.88 KB 34.72 KB 34.71 KB UMD_PROFILING
react-dom.development.js -0.1% -0.0% 769.97 KB 769.49 KB 174.94 KB 174.92 KB NODE_DEV
react-dom.production.min.js -0.0% 0.0% 104.87 KB 104.86 KB 33.53 KB 33.54 KB NODE_PROD
react-dom.profiling.min.js -0.0% -0.0% 107.99 KB 107.97 KB 34.17 KB 34.16 KB NODE_PROFILING
ReactDOM-dev.js -0.1% -0.0% 792.88 KB 792.25 KB 176.09 KB 176.08 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.1% 🔺+0.1% 320.99 KB 321.46 KB 58.8 KB 58.85 KB FB_WWW_PROD
ReactDOM-profiling.js +0.1% +0.1% 326.93 KB 327.39 KB 60.08 KB 60.12 KB FB_WWW_PROFILING
react-dom-unstable-fire.development.js -0.1% -0.0% 775.92 KB 775.45 KB 176.59 KB 176.57 KB UMD_DEV
react-dom-unstable-fire.production.min.js -0.0% -0.0% 104.91 KB 104.89 KB 34.07 KB 34.06 KB UMD_PROD
react-dom-unstable-fire.profiling.min.js -0.0% -0.0% 107.91 KB 107.9 KB 34.73 KB 34.72 KB UMD_PROFILING
react-dom-unstable-fire.development.js -0.1% -0.0% 770.31 KB 769.84 KB 175.08 KB 175.05 KB NODE_DEV
react-dom-unstable-fire.production.min.js -0.0% 0.0% 104.89 KB 104.87 KB 33.54 KB 33.55 KB NODE_PROD
react-dom-unstable-fire.profiling.min.js -0.0% -0.0% 108 KB 107.99 KB 34.18 KB 34.17 KB NODE_PROFILING
ReactFire-dev.js -0.1% -0.0% 792.09 KB 791.46 KB 176.05 KB 176.04 KB FB_WWW_DEV
ReactFire-prod.js 🔺+0.2% 0.0% 309.53 KB 310 KB 56.44 KB 56.46 KB FB_WWW_PROD
ReactFire-profiling.js +0.1% +0.1% 315.55 KB 316.02 KB 57.72 KB 57.79 KB FB_WWW_PROFILING
react-dom-test-utils.production.min.js 0.0% 🔺+0.1% 10.27 KB 10.27 KB 3.8 KB 3.8 KB UMD_PROD
react-dom-test-utils.development.js 0.0% 0.0% 46.78 KB 46.78 KB 12.92 KB 12.92 KB NODE_DEV
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.28 KB 60.28 KB 15.79 KB 15.79 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 🔺+0.1% 10.75 KB 10.75 KB 3.7 KB 3.71 KB NODE_PROD
react-dom-server.browser.development.js 0.0% -0.0% 127.39 KB 127.39 KB 33.95 KB 33.95 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 18.89 KB 18.89 KB 7.22 KB 7.22 KB UMD_PROD
react-dom-server.browser.development.js 0.0% -0.0% 123.52 KB 123.52 KB 33.02 KB 33.02 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 18.81 KB 18.81 KB 7.21 KB 7.21 KB NODE_PROD
ReactDOMServer-dev.js 0.0% 0.0% 124.37 KB 124.37 KB 32.47 KB 32.47 KB FB_WWW_DEV
react-dom-server.node.development.js 0.0% -0.0% 125.58 KB 125.58 KB 33.56 KB 33.56 KB NODE_DEV
react-dom-server.node.production.min.js 0.0% -0.0% 19.69 KB 19.69 KB 7.52 KB 7.52 KB NODE_PROD
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 3.7 KB 3.7 KB 1.42 KB 1.42 KB NODE_DEV

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js -0.1% -0.0% 551.25 KB 550.77 KB 119.64 KB 119.61 KB UMD_DEV
react-art.production.min.js 0.0% 0.0% 96.91 KB 96.94 KB 29.88 KB 29.89 KB UMD_PROD
react-art.development.js -0.1% -0.0% 482.14 KB 481.66 KB 102.34 KB 102.31 KB NODE_DEV
react-art.production.min.js 0.0% 0.0% 61.83 KB 61.86 KB 18.99 KB 18.99 KB NODE_PROD
ReactART-dev.js -0.1% -0.0% 491.35 KB 490.72 KB 101.58 KB 101.56 KB FB_WWW_DEV
ReactART-prod.js 0.0% 🔺+0.1% 194.9 KB 194.97 KB 33.1 KB 33.14 KB FB_WWW_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js -0.1% -0.0% 617.14 KB 616.51 KB 131.86 KB 131.84 KB RN_FB_DEV
ReactNativeRenderer-prod.js -0.0% -0.1% 245.58 KB 245.47 KB 42.95 KB 42.92 KB RN_FB_PROD
ReactNativeRenderer-profiling.js -0.0% -0.2% 251.82 KB 251.7 KB 44.34 KB 44.27 KB RN_FB_PROFILING
ReactNativeRenderer-dev.js -0.1% -0.0% 617.05 KB 616.42 KB 131.82 KB 131.81 KB RN_OSS_DEV
ReactNativeRenderer-prod.js -0.0% -0.1% 245.6 KB 245.48 KB 42.95 KB 42.92 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js -0.0% -0.2% 251.84 KB 251.72 KB 44.34 KB 44.27 KB RN_OSS_PROFILING
ReactFabric-dev.js -0.1% -0.0% 607.99 KB 607.41 KB 129.57 KB 129.56 KB RN_FB_DEV
ReactFabric-prod.js 🔺+0.4% 🔺+0.6% 238.78 KB 239.75 KB 41.52 KB 41.79 KB RN_FB_PROD
ReactFabric-profiling.js +0.4% +0.7% 244.16 KB 245.07 KB 42.88 KB 43.16 KB RN_FB_PROFILING
ReactFabric-dev.js -0.1% -0.0% 607.9 KB 607.32 KB 129.53 KB 129.52 KB RN_OSS_DEV
ReactFabric-prod.js 🔺+0.4% 🔺+0.6% 238.78 KB 239.75 KB 41.52 KB 41.78 KB RN_OSS_PROD
ReactFabric-profiling.js +0.4% +0.7% 244.17 KB 245.08 KB 42.87 KB 43.15 KB RN_OSS_PROFILING

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js -0.1% -0.0% 491.18 KB 490.7 KB 104.05 KB 104.02 KB UMD_DEV
react-test-renderer.production.min.js -0.1% -0.1% 62.91 KB 62.86 KB 19.33 KB 19.32 KB UMD_PROD
react-test-renderer.development.js -0.1% -0.0% 486.7 KB 486.22 KB 102.89 KB 102.86 KB NODE_DEV
react-test-renderer.production.min.js -0.1% 0.0% 62.56 KB 62.51 KB 19.07 KB 19.07 KB NODE_PROD
ReactTestRenderer-dev.js -0.1% -0.0% 496.72 KB 496.09 KB 102.52 KB 102.51 KB FB_WWW_DEV
react-test-renderer-shallow.development.js 0.0% 0.0% 37.2 KB 37.2 KB 9.5 KB 9.5 KB UMD_DEV
react-test-renderer-shallow.development.js 0.0% 0.0% 31.5 KB 31.5 KB 8.14 KB 8.14 KB NODE_DEV

react-noop-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-noop-renderer.development.js +6.7% +3.3% 24.33 KB 25.95 KB 5.98 KB 6.18 KB NODE_DEV
react-noop-renderer.production.min.js 🔺+7.8% 🔺+3.3% 8.84 KB 9.53 KB 2.97 KB 3.07 KB NODE_PROD
react-noop-renderer-persistent.development.js +6.6% +3.3% 24.44 KB 26.07 KB 5.99 KB 6.19 KB NODE_DEV
react-noop-renderer-persistent.production.min.js 🔺+7.8% 🔺+3.3% 8.86 KB 9.55 KB 2.98 KB 3.08 KB NODE_PROD

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.development.js -0.1% -0.0% 480.33 KB 479.89 KB 100.86 KB 100.83 KB NODE_DEV
react-reconciler.production.min.js 🔺+0.1% 🔺+0.1% 63 KB 63.05 KB 18.84 KB 18.85 KB NODE_PROD
react-reconciler-persistent.development.js -0.1% -0.0% 478.53 KB 478.09 KB 100.15 KB 100.13 KB NODE_DEV
react-reconciler-persistent.production.min.js 🔺+0.1% 🔺+0.1% 63.01 KB 63.07 KB 18.85 KB 18.86 KB NODE_PROD

Generated by 🚫 dangerJS

Instead of the test renderer, since test renderer does not support
running in persistent mode.
Adds a test for a subtle edge case that only occurs in persistent mode.
This sidesteps the problem where createHiddenTextInstance needs access
to the host context.
@acdlite acdlite force-pushed the persistent-placeholder-tests branch from 8066a4b to 9182e16 Compare March 6, 2019 23:06
@acdlite acdlite merged commit 3f4852f into facebook:master Mar 9, 2019
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