Skip to content

Commit 420f0b7

Browse files
authored
Remove Reconciler fork (1/2) (#25774)
We've heard from multiple contributors that the Reconciler forking mechanism was confusing and/or annoying to deal with. Since it's currently unused and there's no immediate plans to start using it again, this removes the forking. Fully removing the fork is split into 2 steps to preserve file history: **This PR** - remove `enableNewReconciler` feature flag. - remove `unstable_isNewReconciler` export - remove eslint rules for cross fork imports - remove `*.new.js` files and update imports - merge non-suffixed files into `*.old` files where both exist (sometimes types were defined there) **#25775** - rename `*.old` files
1 parent 030dae2 commit 420f0b7

File tree

110 files changed

+71
-33065
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+71
-33065
lines changed

.circleci/config.yml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -462,35 +462,6 @@ jobs:
462462
cp ./scripts/release/ci-npmrc ~/.npmrc
463463
scripts/release/publish.js --ci --tags << parameters.dist_tag >>
464464
465-
# We don't always keep the reconciler forks in sync (otherwise it we wouldn't
466-
# have forked it) but during periods when they are meant to be in sync, we
467-
# use this job to confirm there are no differences.
468-
sync_reconciler_forks:
469-
docker: *docker
470-
environment: *environment
471-
steps:
472-
- checkout
473-
- *restore_node_modules
474-
- run:
475-
name: Fetch revisions that contain an intentional fork
476-
# This will fetch each revision listed in the `forked-revisions` file,
477-
# which may be necessary if it's not part of main. For example, it
478-
# may have been part of a PR branch that was squashed on merge.
479-
command: |
480-
cut -d " " -f 1 scripts/merge-fork/forked-revisions | xargs -r git fetch origin
481-
- run:
482-
name: Revert forked revisions
483-
# This will revert the changes without committing. At the end, it's
484-
# expected that both forks will be identical.
485-
command: |
486-
cut -d " " -f 1 scripts/merge-fork/forked-revisions | xargs -r git revert --no-commit
487-
- run:
488-
name: Confirm reconciler forks are the same
489-
command: |
490-
yarn replace-fork
491-
git diff --quiet || (echo "Reconciler forks are not the same! Run yarn replace-fork. Or, if this was intentional, add the commit SHA to scripts/merge-fork/forked-revisions." && false)
492-
493-
494465
workflows:
495466
version: 2
496467

@@ -506,11 +477,6 @@ workflows:
506477
- yarn_flow:
507478
requires:
508479
- setup
509-
# NOTE: This job is only enabled when we want the forks to be in sync.
510-
# When the forks intentionally diverge, comment out the job to disable it.
511-
- sync_reconciler_forks:
512-
requires:
513-
- setup
514480
- check_generated_fizz_runtime:
515481
requires:
516482
- setup

.eslintrc.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,6 @@ module.exports = {
112112
'react-internal/no-to-warn-dev-within-to-throw': ERROR,
113113
'react-internal/warning-args': ERROR,
114114
'react-internal/no-production-logging': ERROR,
115-
'react-internal/no-cross-fork-imports': ERROR,
116-
'react-internal/no-cross-fork-types': [
117-
ERROR,
118-
{
119-
old: [],
120-
new: [],
121-
},
122-
],
123115
},
124116

125117
overrides: [

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@
140140
"prettier": "node ./scripts/prettier/index.js write-changed",
141141
"prettier-all": "node ./scripts/prettier/index.js write",
142142
"version-check": "node ./scripts/tasks/version-check.js",
143-
"merge-fork": "node ./scripts/merge-fork/merge-fork.js",
144-
"replace-fork": "node ./scripts/merge-fork/replace-fork.js",
145143
"publish-prereleases": "node ./scripts/release/publish-using-ci-workflow.js",
146144
"download-build": "node ./scripts/release/download-experimental-build.js",
147145
"download-build-for-head": "node ./scripts/release/download-experimental-build.js --commit=$(git rev-parse HEAD)",

packages/react-art/src/ReactART.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
createContainer,
1313
updateContainer,
1414
injectIntoDevTools,
15-
} from 'react-reconciler/src/ReactFiberReconciler';
15+
} from 'react-reconciler/src/ReactFiberReconciler.old';
1616
import Transform from 'art/core/transform';
1717
import Mode from 'art/modes/current';
1818
import FastNoSideEffects from 'art/modes/fast-noSideEffects';

packages/react-art/src/ReactARTHostConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Mode from 'art/modes/current';
1010

1111
import {TYPES, EVENT_TYPES, childrenAsString} from './ReactARTInternals';
1212

13-
import {DefaultEventPriority} from 'react-reconciler/src/ReactEventPriorities';
13+
import {DefaultEventPriority} from 'react-reconciler/src/ReactEventPriorities.old';
1414

1515
const pooledTransform = new Transform();
1616

packages/react-dom-bindings/src/client/ReactDOMFloatClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
markNodeAsResource,
3030
} from './ReactDOMComponentTree';
3131
import {HTML_NAMESPACE, SVG_NAMESPACE} from '../shared/DOMNamespaces';
32-
import {getCurrentRootHostContainer} from 'react-reconciler/src/ReactFiberHostContext';
32+
import {getCurrentRootHostContainer} from 'react-reconciler/src/ReactFiberHostContext.old';
3333

3434
// The resource types we support. currently they match the form for the as argument.
3535
// In the future this may need to change, especially when modules / scripts are supported

packages/react-dom-bindings/src/client/ReactDOMHostConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @flow
88
*/
99

10-
import type {EventPriority} from 'react-reconciler/src/ReactEventPriorities';
10+
import type {EventPriority} from 'react-reconciler/src/ReactEventPriorities.old';
1111
import type {DOMEventName} from '../events/DOMEventNames';
1212
import type {Fiber, FiberRoot} from 'react-reconciler/src/ReactInternalTypes';
1313
import type {
@@ -81,7 +81,7 @@ import {
8181
} from 'react-reconciler/src/ReactWorkTags';
8282
import {listenToAllSupportedEvents} from '../events/DOMPluginEventSystem';
8383

84-
import {DefaultEventPriority} from 'react-reconciler/src/ReactEventPriorities';
84+
import {DefaultEventPriority} from 'react-reconciler/src/ReactEventPriorities.old';
8585

8686
// TODO: Remove this deep import when we delete the legacy root API
8787
import {ConcurrentMode, NoMode} from 'react-reconciler/src/ReactTypeOfMode';

packages/react-dom-bindings/src/events/ReactDOMEventListener.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @flow
88
*/
99

10-
import type {EventPriority} from 'react-reconciler/src/ReactEventPriorities';
10+
import type {EventPriority} from 'react-reconciler/src/ReactEventPriorities.old';
1111
import type {AnyNativeEvent} from '../events/PluginModuleType';
1212
import type {Fiber, FiberRoot} from 'react-reconciler/src/ReactInternalTypes';
1313
import type {Container, SuspenseInstance} from '../client/ReactDOMHostConfig';
@@ -52,7 +52,7 @@ import {
5252
IdleEventPriority,
5353
getCurrentUpdatePriority,
5454
setCurrentUpdatePriority,
55-
} from 'react-reconciler/src/ReactEventPriorities';
55+
} from 'react-reconciler/src/ReactEventPriorities.old';
5656
import ReactSharedInternals from 'shared/ReactSharedInternals';
5757
import {isRootDehydrated} from 'react-reconciler/src/ReactFiberShellHydration';
5858

packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type {Container, SuspenseInstance} from '../client/ReactDOMHostConfig';
1212
import type {DOMEventName} from '../events/DOMEventNames';
1313
import type {EventSystemFlags} from './EventSystemFlags';
1414
import type {FiberRoot} from 'react-reconciler/src/ReactInternalTypes';
15-
import type {EventPriority} from 'react-reconciler/src/ReactEventPriorities';
15+
import type {EventPriority} from 'react-reconciler/src/ReactEventPriorities.old';
1616

1717
import {enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay} from 'shared/ReactFeatureFlags';
1818
import {
@@ -35,7 +35,7 @@ import {
3535
getClosestInstanceFromNode,
3636
} from '../client/ReactDOMComponentTree';
3737
import {HostRoot, SuspenseComponent} from 'react-reconciler/src/ReactWorkTags';
38-
import {isHigherEventPriority} from 'react-reconciler/src/ReactEventPriorities';
38+
import {isHigherEventPriority} from 'react-reconciler/src/ReactEventPriorities.old';
3939
import {isRootDehydrated} from 'react-reconciler/src/ReactFiberShellHydration';
4040

4141
let _attemptSynchronousHydration: (fiber: Object) => void;

packages/react-dom/index.classic.fb.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export {
3030
unstable_batchedUpdates,
3131
unstable_createEventHandle,
3232
unstable_flushControlled,
33-
unstable_isNewReconciler,
3433
unstable_renderSubtreeIntoContainer,
3534
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
3635
preinit,

0 commit comments

Comments
 (0)