Skip to content

Cleanup, remove the PRODUCTION flag - #37882

Closed
cipolleschi wants to merge 2 commits into
react:mainfrom
cipolleschi:export-D46726208
Closed

Cleanup, remove the PRODUCTION flag#37882
cipolleschi wants to merge 2 commits into
react:mainfrom
cipolleschi:export-D46726208

Conversation

@cipolleschi

Copy link
Copy Markdown
Contributor

Summary:
After some progressive changes, we can finally remove the PRODUCTION flag from the codebase.

Changelog:

[iOS][Removed] - Remove PRODUCTION flag from iOS build logic

Differential Revision: D46726208

@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: Facebook Partner: Facebook Partner fb-exported labels Jun 14, 2023
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@analysis-bot

analysis-bot commented Jun 14, 2023

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a8,757,670+1
androidhermesarmeabi-v7a8,070,238+1
androidhermesx869,250,266+1
androidhermesx86_649,099,405-1
androidjscarm64-v8a9,318,871+1
androidjscarmeabi-v7a8,508,774+1
androidjscx869,382,362+0
androidjscx86_649,635,608+2

Base commit: b3cc19c
Branch: main

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@cipolleschi
cipolleschiforce-pushed the export-D46726208 branch 2 times, most recently from d22042b to 22367dfCompareJune 14, 2023 16:18
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

Riccardo Cipolleschiand others added 2 commits June 14, 2023 09:53
Summary:
Currently, we ask users to reinstall the pods using the `PRODUCTION` flag when they want to either profile their app or prepare a release.
This way of working with the Release mode is not standard. One of the reason why we introduced it was to provide a different binary for Hermes and reinstalling the pods was the quickest way.
With this change, we are deferring the decision on when Hermes should be installed for apps to the moment where the app is actually build by the system.
These changes are not applied to Nightlies, when a specific tarball is passed to the cocoapods using the `HERMES_ENGINE_TARBALL_PATH` env var, and when hermes is built from source as in these scenarios we are usually not interested in building for Release.
The system is also smart enough not to redownload the tarball if the configuration does not change. It assumes that the default configuration when the pods are installed for the first time is Debug.
## Changelog:
[IOS] [CHANGED] - Download the right `hermes-engine` configuration at build time.
Pull Request resolved: #37850
Test Plan:
- CircleCI green for the Release template jobs
- Tested locally modifying the `hermes-utils` to force specific versions.
- Tested locally with RNTestProject
Differential Revision: D46687390
Pulled By: cipolleschi
fbshipit-source-id: f2193fc1fc6459c59681008d42314a049418aa1e
Summary:
Pull Request resolved: #37882
After some progressive changes, we can finally remove the PRODUCTION flag from the codebase.
## Changelog:
[iOS][Removed] - Remove PRODUCTION flag from iOS build logic
Reviewed By: cortinico, dmytrorykun
Differential Revision: D46726208
fbshipit-source-id: 46c2539ff3dfeb3791ca77ca244d1ef0a0d7023e
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@facebook-github-botfacebook-github-bot added the Merged This PR has been merged. label Jun 14, 2023
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in daa99fe.

}

// Assumption: if there is no stored last build, we assume that it was build for debug.
if (!fs.existsSync && configuration === 'Debug') {

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.

hi @cipolleschi, wondering if !fs.existsSync should be !fileExists instead?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

ooops! 🤦
Well spot. I'll prepare a followup soon!

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.fb-exportedMergedThis PR has been merged.p: FacebookPartner: FacebookPartner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@cipolleschi@facebook-github-bot@analysis-bot@adrianha