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

Remove Reconciler forking #25773

Closed
wants to merge 7 commits into from
Closed

Remove Reconciler forking #25773

wants to merge 7 commits into from

Conversation

kassens
Copy link
Member

@kassens kassens commented Dec 1, 2022

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.

@kassens kassens requested a review from acdlite December 1, 2022 20:56
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Dec 1, 2022
@acdlite
Copy link
Collaborator

acdlite commented Dec 1, 2022

Rather than removing all the infra around it, can you remove just the forked files and keep the rest of the infra in place so we can enable it again in the future?

Although we're not using it currently, it's been extremely helpful several times in the past. I used it over the summer to land a complex refactor.

@@ -30,7 +30,6 @@ export {
unstable_batchedUpdates,
unstable_createEventHandle,
unstable_flushControlled,
unstable_isNewReconciler,
Copy link
Member Author

Choose a reason for hiding this comment

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

I tried a quick code search, but I didn't see any place reading this value internally. Not sure I missed something if anyone remembers the reason this was exposed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It was used in www at one point to detect which version of the reconciler was enabled at runtime. Shouldn't need it anymore.

// NOTE: I did not put much thought into how to configure this.
__VARIANT__: bundle.enableNewReconciler === true,
// NOTE: Should only be used in test files.
__VARIANT__: true,
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is just for the released bundles, so it shouldn't actually be ever found in files that end up in the bundle? I only found uses of the __VARIANT__ variable from tests and the feature flag files.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah I think you can remove it

Copy link
Collaborator

@acdlite acdlite left a comment

Choose a reason for hiding this comment

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

Actually I retract my objection. If/when I want to use this again in the future, I'll implement it a different way that forks at the entire package level, rather than per-file. I think originally we did the per-file thing because it started as only forking a handful of files but it evolved into covering essentially the whole thing.

@acdlite
Copy link
Collaborator

acdlite commented Dec 1, 2022

Do you mind renaming the files in a PR all by itself so that the history is preserved? And so existing PRs can be rebased cleanly. Something like:

  • PR 1: Delete all the build/testing infra, and all the .old files, but keep the .new suffix on the modules.
  • PR 2: Remove the .new suffix from the files.

I messed this up when I introduced the forked files originally because, although I did it in multiple commits, I only had a single PR and they got squashed when I merged it 😆

@kassens
Copy link
Member Author

kassens commented Dec 1, 2022

Step one is in #25774 now.

@kassens kassens closed this Dec 1, 2022
@kassens kassens deleted the remove-fork branch December 2, 2022 00:26
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.

3 participants