Skip to content

Conversation

@okwasniewski
Copy link
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-bot facebook-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
Copy link
Contributor

@cipolleschi cipolleschi left a comment

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
Contributor Author

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

@cipolleschi
Copy link
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
Contributor Author

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
Contributor

Yeah, that seems reasonable to me.

@okwasniewski okwasniewski force-pushed the feat/use-newArchEnabled branch from a873d9f to 688e923 Compare October 4, 2024 10:14
@okwasniewski okwasniewski force-pushed the feat/use-newArchEnabled branch from 688e923 to 4b4ae52 Compare October 4, 2024 10:15
@okwasniewski okwasniewski changed the title feat: use newArchEnabled in RCTRootViewFactory feat: deprecate passing separate new arch flags to RCTRootViewFactory Oct 4, 2024
@okwasniewski
Copy link
Contributor Author

@cipolleschi I've deprecated the initializers

@facebook-github-bot
Copy link
Contributor

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

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

@cipolleschi merged this pull request in 7e1674f.

@react-native-bot
Copy link
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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants