Skip to content

feat: deprecate passing separate new arch flags to RCTRootViewFactory - #46652

Closed
okwasniewski wants to merge 1 commit into
react:mainfrom
okwasniewski:feat/use-newArchEnabled
Closed

feat: deprecate passing separate new arch flags to RCTRootViewFactory#46652
okwasniewski wants to merge 1 commit into
react:mainfrom
okwasniewski:feat/use-newArchEnabled

Conversation

@okwasniewski

Copy link
Copy Markdown
Contributor

Summary:

This PR follows up with the deprecation introduced here: #46228

The idea is to have new architecture depend on one flag, namely newArchEnabled. It exposes additional initializers for RCTRootViewFactory.

Changelog:

[IOS] [CHANGED] - Use newArchEnabled flag in RCTAppDelegate and RCTRootViewFactory

Test Plan:

CI Green

@facebook-github-botfacebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Callstack Partner: Callstack Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Sep 26, 2024

@cipolleschicipolleschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sadly, we can't merge this. If we do this, people will not be able to turn off selectively parts of the New Architecture, and we are not ready to remove this possibility just yet.

@okwasniewski

Copy link
Copy Markdown
ContributorAuthor

@cipolleschi Yeah, I was afraid its too early 😅 Do you think we can deprecate RCTRootViewFactory initializers?

@cipolleschi

Copy link
Copy Markdown
Contributor

Do you think we can deprecate RCTRootViewFactory initializers?

What do you mean? Do you want to move away from some initializers?

@okwasniewski

Copy link
Copy Markdown
ContributorAuthor

Do you think we can deprecate RCTRootViewFactory initializers?

What do you mean? Do you want to move away from some initializers?

@cipolleschi Yeah, I want to deprecate initializers that accept multiple flags

Deprecate this:

- (instancetype)initWithBundleURL:(NSURL *)bundleURL
newArchEnabled:(BOOL)newArchEnabled
turboModuleEnabled:(BOOL)turboModuleEnabled
bridgelessEnabled:(BOOL)bridgelessEnabled

And make this preferred:

- (instancetype)initWithBundleURL:(NSURL *)bundleURL
newArchEnabled:(BOOL)newArchEnabled

So users that rely on setting different flags can still use it but for new (brownfield) integrations they can use newArchEnabled parameter.

@cipolleschi

Copy link
Copy Markdown
Contributor

Yeah, that seems reasonable to me.

@okwasniewski
okwasniewskiforce-pushed the feat/use-newArchEnabled branch from a873d9f to 688e923CompareOctober 4, 2024 10:14
@okwasniewski
okwasniewskiforce-pushed the feat/use-newArchEnabled branch from 688e923 to 4b4ae52CompareOctober 4, 2024 10:15
@okwasniewskiokwasniewski changed the title feat: use newArchEnabled in RCTRootViewFactoryfeat: deprecate passing separate new arch flags to RCTRootViewFactoryOct 4, 2024
@okwasniewski

Copy link
Copy Markdown
ContributorAuthor

@cipolleschi I've deprecated the initializers

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-botfacebook-github-bot added the Merged This PR has been merged. label Oct 10, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@cipolleschi merged this pull request in 7e1674f.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @okwasniewski in 7e1674f

When will my fix make it into a release? | How to file a pick request?

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.p: CallstackPartner: CallstackPartnerShared with MetaApplied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@okwasniewski@cipolleschi@facebook-github-bot@react-native-bot