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

Unify usage of USE_HERMES flag #41625

Closed
wants to merge 2 commits into from

Conversation

cipolleschi
Copy link
Contributor

Summary:
To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:

  • USE_HERMES
  • RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

Changelog:

[Internal] - Unify the USE_HERMES flags

Differential Revision: D51549284

@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: Facebook Partner: Facebook Partner labels Nov 23, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51549284

@analysis-bot
Copy link

analysis-bot commented Nov 23, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,681,002 +8
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 21,064,008 -1
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: ef9c164
Branch: main

cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Nov 23, 2023
Summary:

To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:
- USE_HERMES
- RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

## Changelog:
[Internal] - Unify the USE_HERMES flags

Differential Revision: D51549284
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51549284

cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Nov 24, 2023
Summary:

To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:
- USE_HERMES
- RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

## Changelog:
[Internal] - Unify the USE_HERMES flags

Differential Revision: D51549284
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51549284

cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Nov 24, 2023
Summary:

To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:
- USE_HERMES
- RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

## Changelog:
[Internal] - Unify the USE_HERMES flags

Differential Revision: D51549284
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51549284

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51549284

cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Nov 24, 2023
Summary:

To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:
- USE_HERMES
- RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

## Changelog:
[Internal] - Unify the USE_HERMES flags

Differential Revision: D51549284
cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Nov 27, 2023
Summary:

To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:
- USE_HERMES
- RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

## Changelog:
[Internal] - Unify the USE_HERMES flags

Reviewed By: christophpurrer

Differential Revision: D51549284
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51549284

cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Nov 27, 2023
Summary:

To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:
- USE_HERMES
- RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

## Changelog:
[Internal] - Unify the USE_HERMES flags

Reviewed By: christophpurrer

Differential Revision: D51549284
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51549284

cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Nov 27, 2023
Summary:

To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:
- USE_HERMES
- RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

## Changelog:
[Internal] - Unify the USE_HERMES flags

Reviewed By: christophpurrer

Differential Revision: D51549284
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51549284

cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Nov 27, 2023
Summary:

To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:
- USE_HERMES
- RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

## Changelog:
[Internal] - Unify the USE_HERMES flags

Reviewed By: christophpurrer

Differential Revision: D51549284
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51549284

cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Nov 27, 2023
Summary:

To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:
- USE_HERMES
- RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

## Changelog:
[Internal] - Unify the USE_HERMES flags

Reviewed By: christophpurrer

Differential Revision: D51549284
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51549284

cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Nov 27, 2023
Summary:

To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:
- USE_HERMES
- RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

## Changelog:
[Internal] - Unify the USE_HERMES flags

Reviewed By: christophpurrer

Differential Revision: D51549284
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51549284

Riccardo Cipolleschi added 2 commits November 27, 2023 06:23
…MES Flag" (facebook#41626)

Summary:

In the codebase, we never set the RCT_USE_HERMES flag.

When we install the pods, we use the USE_HERMES flag and we set USE_HERMES as a build setting. So, the RCT_USE_HERMES flag will always be not set for the OSS.

https://pxl.cl/3RRxr

## Changelog:
[iOS][Fixed] - use the right USE_HERMES flag

## Facebook:
This change was incorrect as in OSS we never set the RCT_USE_HERMES flag, while we actually set the USE_HERMES one.

I will align the BUCK RNTester setup in the next diff of the stackog:

Reviewed By: dmytrorykun

Differential Revision: D51547810
Summary:

To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:
- USE_HERMES
- RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

## Changelog:
[Internal] - Unify the USE_HERMES flags

Reviewed By: christophpurrer

Differential Revision: D51549284
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51549284

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Nov 27, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3a045b6.

fkgozali added a commit to fkgozali/react-native that referenced this pull request Jan 5, 2024
Summary:
facebook#41625 cleaned up some usages, but there are some remaining ones.

Changelog: [Fixed][iOS] Further cleaned up RCT_USE_HERMES

Differential Revision: D52555309
facebook-github-bot pushed a commit that referenced this pull request Jan 5, 2024
Summary:
Pull Request resolved: #42148

#41625 cleaned up some usages, but there are some remaining ones.

Changelog: [iOS][Fixed] Further cleaned up RCT_USE_HERMES

Reviewed By: cipolleschi

Differential Revision: D52555309

fbshipit-source-id: e19d10de339636eca2f4762a78cebb282d0427d9
Othinn pushed a commit to Othinn/react-native that referenced this pull request Jan 9, 2024
Summary:
Pull Request resolved: facebook#41625

To tell React Native whether we are building with hermes or not on iOS, we were using 2 different build time flags:
- USE_HERMES
- RCT_USE_HERMES

The first was widely used by the OSS use case, while the latter was set internally.
Worse than that, their default values were the opposite and we were never setting the RCT_USE_HERMES explicitly with Cocoapods, while there was some piece of code that was trying to "smartly" detect whether Hermes was included or not.

This change unifies the behavior, removing the "smartness" in favor od a declarative approach.

## Changelog:
[Internal] - Unify the USE_HERMES flags

Reviewed By: christophpurrer

Differential Revision: D51549284

fbshipit-source-id: 829ad361e185d5b4fa227605523af3a8e590e95c
Othinn pushed a commit to Othinn/react-native that referenced this pull request Jan 9, 2024
…#42148)

Summary:
Pull Request resolved: facebook#42148

facebook#41625 cleaned up some usages, but there are some remaining ones.

Changelog: [iOS][Fixed] Further cleaned up RCT_USE_HERMES

Reviewed By: cipolleschi

Differential Revision: D52555309

fbshipit-source-id: e19d10de339636eca2f4762a78cebb282d0427d9
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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants