-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Remove unstable scheduler/tracing API #20037
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9bd8867:
|
Comparing: 84b9162...104fdc5 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
Details of bundled changes.Comparing: c57fe4a...9bd8867 react-dom
react-art
react
react-reconciler
react-test-renderer
react-native-renderer
ReactDOM: size: 0.0%, gzip: 0.0% React: size: -2.8%, gzip: -1.9% Size changes (experimental) |
Is it worth implementing a much scaled down version of tracing that is React-specific (doesn’t try to wrap non-React APIs) and never cascades (so the implementation complexity is low and interactions don’t leak into unrelated cascading commits)? |
I appreciate this PR. I hear you loud and clear. Let's discuss what remaining features are useful and how else we can solve them. |
Sure. Had this as a topic for the sync today but forgot you wouldn't be at this one. Moved it to next week. Happy to chat out of band too if that' easier. Maybe there's a trimmed down version that would be worth keeping. |
9bd8867
to
28d1504
Compare
Rebased this and it's ready to review. |
28d1504
to
6523863
Compare
I'm not sure how to mock the jest.mock('scheduler', () => jest.requireActual('scheduler-0-13'));
jest.mock('scheduler/tracing', () => jest.requireActual('scheduler-0-13/tracing'));
jest.mock('react', () => jest.requireActual('react-16-8'));
jest.mock('react-dom', () => jest.requireActual('react-dom-16-8')); But Jest throws because there isn't an actual "scheduler/tracing" module installed locally. Edit The answer was to also add a dummy file in |
df91387
to
1897759
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉
1897759
to
104fdc5
Compare
D28001916 shows (what I believe to be) a successful merge of this change (with all e2e and unit tests passing) so... let's go! |
Summary: This sync includes the following changes: - **[9a2591681](facebook/react@9a2591681 )**: Fix export //<Sebastian Markbage>// - **[4a8deb083](facebook/react@4a8deb083 )**: Switch the isPrimaryRender flag based on the stream config ([#21357](facebook/react#21357)) //<Sebastian Markbåge>// - **[bd4f056a3](facebook/react@bd4f056a3 )**: [Fizz] Implement lazy components and nodes ([#21355](facebook/react#21355)) //<Sebastian Markbåge>// - **[fc33f12bd](facebook/react@fc33f12bd )**: Remove unstable scheduler/tracing API ([#20037](facebook/react#20037)) //<Brian Vaughn>// - **[721238394](facebook/react@721238394 )**: Enable strict effects mode for React Native Facebook builds ([#21354](facebook/react#21354)) //<Brian Vaughn>// - **[48740429b](facebook/react@48740429b )**: Expiration: Do nothing except disable time slicing ([#21345](facebook/react#21345)) //<Andrew Clark>// - **[0f5ebf366](facebook/react@0f5ebf366 )**: Delete unreferenced type ([#21343](facebook/react#21343)) //<Andrew Clark>// - **[9cd52b27f](facebook/react@9cd52b27f )**: Restore context after an error happens ([#21341](facebook/react#21341)) //<Sebastian Markbåge>// - **[ad091759a](facebook/react@ad091759a )**: Revert "Emit reactroot attribute on the first element we discover ([#21154](facebook/react#21154))" ([#21340](facebook/react#21340)) //<Sebastian Markbåge>// - **[709f94841](facebook/react@709f94841 )**: [Fizz] Add FB specific streaming API and build ([#21337](facebook/react#21337)) //<Sebastian Markbåge>// - **[e8cdce40d](facebook/react@e8cdce40d )**: Don't flush sync at end of discreteUpdates ([#21327](facebook/react#21327)) //<Andrew Clark>// - **[a15586001](facebook/react@a15586001 )**: Fix: Don't flush discrete at end of batchedUpdates ([#21229](facebook/react#21229)) //<Andrew Clark>// - **[89847bf6e](facebook/react@89847bf6e )**: Continuous updates should interrupt transitions ([#21323](facebook/react#21323)) //<Andrew Clark>// - **[ef37d55b6](facebook/react@ef37d55b6 )**: Use performConcurrentWorkOnRoot for "sync default" ([#21322](facebook/react#21322)) //<Andrew Clark>// Changelog: [General][Changed] - React Native sync for revisions a632f7d...2a7bb41 jest_e2e[run_all_tests] Reviewed By: JoshuaGross Differential Revision: D28063006 fbshipit-source-id: 7e3535f80961706863b6c2188ee44b5796b2f000
Was removed in React 17 facebook/react#20037
This was added as part of the "Interaction Tracking" work in facebook#13509 back in 2018. That feature was removed in facebook#20037 in 2020, and this plugin appears to no longer have any effect on the build output.
This was added as part of the "Interaction Tracking" work in facebook#13509 back in 2018. That feature was removed in facebook#20037 in 2020, and this plugin appears to no longer have any effect on the build output.
This was added as part of the "Interaction Tracking" work in facebook#13509 back in 2018. That feature was removed in facebook#20037 in 2020, and this plugin appears to no longer have any effect on the build output.
This was added as part of the "Interaction Tracking" work in facebook#13509 back in 2018. That feature was removed in facebook#20037 in 2020, and this plugin appears to no longer have any effect on the build output.
This was added as part of the "Interaction Tracking" work in facebook#13509 back in 2018. That feature was removed in facebook#20037 in 2020, and this plugin appears to no longer have any effect on the build output.
Resolves #21285
Going to be easier to review this one with whitespace hidden: https://github.com/facebook/react/pull/20037/files?w=1
Mostly just a bunch of deletions. Code to look at a little more closely:
packages/react-reconciler/src/ReactFiberWorkLoop.new.js
Testing this change internally via D28001916. Note that to sync to www after this change, we'll need to delete:
html/shared/node_modules/scheduler/tracing.js
html/shared/react-fb/SchedulerTracing.js
We'll want to update our JS1 sync script to remove the following files:
'SchedulerTracing-dev.modern.js'
'SchedulerTracing-prod.modern.js'
'SchedulerTracing-profiling.modern.js'
We'll also want to update the following file to remove references to Profiler interactions and add a DEV console warning if the
onlyLogInteractions
option is provided:html/intern/js/coreviz/react_profiler/createCoreVizOnRenderCallback.js