Content-Length: 345740 | pFad | http://github.com/facebook/react-native/pull/49371

02 decouple jsc when USE_THIRD_PARTY_JSC=1 on ios by Kudo · Pull Request #49371 · facebook/react-native · GitHub
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

decouple jsc when USE_THIRD_PARTY_JSC=1 on ios #49371

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Kudo
Copy link
Contributor

@Kudo Kudo commented Feb 12, 2025

Summary:

an effort of lean core for jsc: https://github.com/Kudo/discussions-and-proposals/blob/%40kudo/lean-core-jsc/proposals/0836-lean-core-jsc.md. this pr tries to decouple all jsc code when USE_THIRD_PARTY_JSC=1 on ios

this pr includes these changes:

  • exclude React-jsc pod and pod dependency when USE_THIRD_PARTY_JSC=1
  • in objcpp code, remove JSCExecutorFactory / RCTJscInstance references when USE_THIRD_PARTY_JSC=1. it throws c++ errors like No JSRuntimeFactory specified. when no engine is specified (USE_HERMES=0 && USE_THIRD_PARTY_JSC=1). people need to override delegate methods to specify a JSRuntimeFactory.

Changelog:

[IOS] [CHANGED] - Decouple JSC when USE_THIRD_PARTY_JSC=1

Test Plan:

  • ci passed
  • rn-tester build success for RCT_NEW_ARCH_ENABLED=1 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 USE_FRAMEWORKS=dynamic bundle exec pod install
  • rn-tester build success for RCT_NEW_ARCH_ENABLED=0 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 USE_FRAMEWORKS=dynamic bundle exec pod install
  • rn-tester build success for RCT_NEW_ARCH_ENABLED=0 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 bundle exec pod install

@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. Contributor A React Native contributor. p: Expo Partner: Expo Partner labels Feb 12, 2025
@Kudo Kudo force-pushed the @kudo/poc/decouple-jsc-ios branch from 4f00ef7 to ce34e0f Compare February 12, 2025 19:43
@Kudo Kudo changed the title [WIP] decouple jsc when USE_THIRD_PARTY_JSC=1 on ios decouple jsc when USE_THIRD_PARTY_JSC=1 on ios Feb 14, 2025
@Kudo Kudo marked this pull request as ready for review February 14, 2025 11:19
Copy link
Contributor

@okwasniewski okwasniewski left a comment

Choose a reason for hiding this comment

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

Looks good to me

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Feb 14, 2025
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.

It makes sense to me. I left a couple of minor suggestion to avoid code duplication.

if ENV['USE_THIRD_PARTY_JSC'] != '1'
pod 'React-jsc', :path => "#{react_native_path}/ReactCommon/jsc"
if fabric_enabled
pod 'React-jsc/Fabric', :path => "#{react_native_path}/ReactCommon/jsc"
Copy link
Contributor

Choose a reason for hiding this comment

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

not even sure that this subspec is actually needed...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe not but that feels out of scope toward this pr. maybe we can update that in a separate pr?

---------

Co-authored-by: Riccardo Cipolleschi <cipolleschi@meta.com>
@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.

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. Contributor A React Native contributor. p: Expo Partner: Expo 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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/facebook/react-native/pull/49371

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy