-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
moved third-party deps to ReactNativeDependencies in podspecs #49812
base: main
Are you sure you want to change the base?
moved third-party deps to ReactNativeDependencies in podspecs #49812
Conversation
- Removed use of folly, boost, double-conversion, fmt, fast_float and glog from podspec files. - Removed references to folly, boost and double-conversion configuration from podspec files - Updated codegen podspec template
To avoid having to sign our frameworks we cannot include resource bundles - they impose a signing requirement. Therefore resources have been moved to the temporary (untill we move to SPM) podspec files.
Due to the way folly is set up, it needs configuration to be set when building it and also when you reference it through header files. This has led to the folly config having to be set in almost all our podspec files - and also in a lot of OSS libraries. This configuration change makes use of the option in folly to configure using a header file - which will be used both when building and also when referencing it from other libraries - without having to pass folly compiler flags in all podspec files. This is now solved by: 1. In prebuild's setup step (prepareScript) we create the folly-config.h file with the necessary configuration 2. This file is included in the distributed headers Whenever anyone references folly they also include this file - and no extra config flags are needed.
Removed folly, double-conversion, glog, boost, fast_float, fmt from suby helper files
I wasn't able to get all of these tests to pass before my changes, so I'm a bit unsure how far we should go with this.
To be able to ingore comma operator misuse (-Wcomma) we need to add a pragma to ignore it. This is done in the prepare step when we create the folly-config.h file.
Added outputing the valid platforms or dependencies if any of them are invalid.
The utilities are set up to be able to switch between local build and prebuilds of the RN deps. The podspec copies Headers from the framework's arc to be able to correctly install headers in the Pods project. Also removed unused old third-party podspecs.
- rn-deps are now downloaded and installed from source param - rn-deps switches from debug/release and back depending on build type
Updated all pod files and templates to use the new add_rn_dependencies method instead of ReactNativeDependencices directly. This method updates both header search paths and dependency using the correct version (either prebuilt or from source for the deps).
…ct Native dependencies - Switching between building from source/prebuild is implemented using the env-variable `REACT_NATIVE_DEPS_BUILD_FROM_SOURCE` which should be set to 1 to build from source - or if the release url tarballs are not available
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work! I left a few suggestions
# I also needed to wrap the url in quotes to avoid escaping & and ?. | ||
return (`curl -o /dev/null --silent -Iw '%{http_code}' -L "#{tarball_url}"` == "200") | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we haven't integrated nightlies in the flow. That's ok for now, but we should consider adding them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are also missing the flag to pass the dependencies from a prebuild previously downloaded on disk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using RCT_DEPS_VERSION
will check for downloaded artifacts (just like hermes does it) and use it if it exists. Would this be sufficient for now to be able to use a prebuild previously downloaded to disk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be better to have a variable to point to a xcframework on the disk. This will make it easier to integrate this code in CI
If this flag is set it means build deps from source
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…ok#49812) Summary: There are two environment variables that is related to ReactNativeDependencies: - `RCT_USE_DEP_PREBUILD `: If set to 1, ReactNativeDependencies will be built from source. - `RCT_DEPS_VERSION`: If set to 1, it will override the version of ReactNativeDependencies to be used. ## Changelog: [INTERNAL] - Introduced functions to configure ReactNativeDependencies in Cocoapods Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D70968672
…e folly flags (facebook#49812) Summary: Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies. ## Changelog: [INTERNAL] - Configure folly in a prepare step Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032640
…ce (facebook#49812) Summary: Updates all the core podspec to use the new `ReactNativeDependencies` podspec ## Changelog: [INTERNAL] - Updates Modules in core to use the new dependencies. Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032639 Pulled By: cipolleschi
…e folly flags (facebook#49812) Summary: Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies. ## Changelog: [INTERNAL] - Configure folly in a prepare step Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032640 Pulled By: cipolleschi
…ce (facebook#49812) Summary: Updates all the core podspec to use the new `ReactNativeDependencies` podspec ## Changelog: [INTERNAL] - Updates Modules in core to use the new dependencies. Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032639
…e folly flags (facebook#49969) Summary: Pull Request resolved: facebook#49969 Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies. ## Changelog: [INTERNAL] - Configure folly in a prepare step Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Reviewed By: javache Differential Revision: D71032640 Pulled By: cipolleschi
…e folly flags (facebook#49812) Summary: Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies. ## Changelog: [INTERNAL] - Configure folly in a prepare step Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032640
…ce (facebook#49968) Summary: Pull Request resolved: facebook#49968 Updates all the core podspec to use the new `ReactNativeDependencies` podspec ## Changelog: [INTERNAL] - Updates Modules in core to use the new dependencies. Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032639 Pulled By: cipolleschi
…ce (facebook#49812) Summary: Updates all the core podspec to use the new `ReactNativeDependencies` podspec ## Changelog: [INTERNAL] - Updates Modules in core to use the new dependencies. Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032639
…ce (facebook#49968) Summary: Pull Request resolved: facebook#49968 Updates all the core podspec to use the new `ReactNativeDependencies` podspec ## Changelog: [INTERNAL] - Updates Modules in core to use the new dependencies. Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032639 Pulled By: cipolleschi
…e folly flags (facebook#49969) Summary: Pull Request resolved: facebook#49969 Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies. ## Changelog: [INTERNAL] - Configure folly in a prepare step Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Reviewed By: javache Differential Revision: D71032640 Pulled By: cipolleschi
…e folly flags (facebook#49969) Summary: Pull Request resolved: facebook#49969 Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies. ## Changelog: [INTERNAL] - Configure folly in a prepare step Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032640 Reviewed By: javache Pulled By: javache
…ok#49812) Summary: There are two environment variables that is related to ReactNativeDependencies: - `RCT_USE_DEP_PREBUILD `: If set to 1, ReactNativeDependencies will be built from source. - `RCT_DEPS_VERSION`: If set to 1, it will override the version of ReactNativeDependencies to be used. ## Changelog: [INTERNAL] - Introduced functions to configure ReactNativeDependencies in Cocoapods Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D70968672
…ce (facebook#49812) Summary: Updates all the core podspec to use the new `ReactNativeDependencies` podspec ## Changelog: [INTERNAL] - Updates Modules in core to use the new dependencies. Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032639
…e folly flags (facebook#49969) Summary: Pull Request resolved: facebook#49969 Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies. ## Changelog: [INTERNAL] - Configure folly in a prepare step Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032640 Reviewed By: javache Pulled By: javache
…ok#49812) Summary: There are two environment variables that is related to ReactNativeDependencies: - `RCT_USE_DEP_PREBUILD `: If set to 1, ReactNativeDependencies will be built from source. - `RCT_DEPS_VERSION`: If set to 1, it will override the version of ReactNativeDependencies to be used. ## Changelog: [INTERNAL] - Introduced functions to configure ReactNativeDependencies in Cocoapods Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D70968672
…ce (facebook#49812) Summary: Updates all the core podspec to use the new `ReactNativeDependencies` podspec ## Changelog: [INTERNAL] - Updates Modules in core to use the new dependencies. Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032639
…e folly flags (facebook#49969) Summary: Pull Request resolved: facebook#49969 Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies. ## Changelog: [INTERNAL] - Configure folly in a prepare step Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032640 Reviewed By: javache Pulled By: javache
…ok#49812) Summary: There are two environment variables that is related to ReactNativeDependencies: - `RCT_USE_DEP_PREBUILD `: If set to 1, ReactNativeDependencies will be built from source. - `RCT_DEPS_VERSION`: If set to 1, it will override the version of ReactNativeDependencies to be used. ## Changelog: [INTERNAL] - Introduced functions to configure ReactNativeDependencies in Cocoapods Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D70968672
…ce (facebook#49812) Summary: Updates all the core podspec to use the new `ReactNativeDependencies` podspec ## Changelog: [INTERNAL] - Updates Modules in core to use the new dependencies. Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032639
…e folly flags (facebook#49969) Summary: Pull Request resolved: facebook#49969 Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies. ## Changelog: [INTERNAL] - Configure folly in a prepare step Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032640 Reviewed By: javache Pulled By: javache
…ok#49812) Summary: There are two environment variables that is related to ReactNativeDependencies: - `RCT_USE_DEP_PREBUILD `: If set to 1, ReactNativeDependencies will be built from source. - `RCT_DEPS_VERSION`: If set to 1, it will override the version of ReactNativeDependencies to be used. ## Changelog: [INTERNAL] - Introduced functions to configure ReactNativeDependencies in Cocoapods Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D70968672
…ce (facebook#49812) Summary: Updates all the core podspec to use the new `ReactNativeDependencies` podspec ## Changelog: [INTERNAL] - Updates Modules in core to use the new dependencies. Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032639
…e folly flags (facebook#49969) Summary: Pull Request resolved: facebook#49969 Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies. ## Changelog: [INTERNAL] - Configure folly in a prepare step Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032640 Reviewed By: javache Pulled By: javache
…ok#49812) Summary: There are two environment variables that is related to ReactNativeDependencies: - `RCT_USE_DEP_PREBUILD `: If set to 1, ReactNativeDependencies will be built from source. - `RCT_DEPS_VERSION`: If set to 1, it will override the version of ReactNativeDependencies to be used. bypass-github-export-checks ## Changelog: [INTERNAL] - Introduced functions to configure ReactNativeDependencies in Cocoapods Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D70968672 Reviewed By: javache Pulled By: javache
…e folly flags (facebook#49969) Summary: Pull Request resolved: facebook#49969 Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies. ## Changelog: [INTERNAL] - Configure folly in a prepare step Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D71032640 Reviewed By: javache Pulled By: javache
…ok#49812) Summary: There are two environment variables that is related to ReactNativeDependencies: - `RCT_USE_DEP_PREBUILD `: If set to 1, ReactNativeDependencies will be built from source. - `RCT_DEPS_VERSION`: If set to 1, it will override the version of ReactNativeDependencies to be used. bypass-github-export-checks ## Changelog: [INTERNAL] - Introduced functions to configure ReactNativeDependencies in Cocoapods Pull Request resolved: facebook#49812 Test Plan: ✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs ✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities Differential Revision: D70968672 Reviewed By: javache Pulled By: javache
Summary:
There are two environment variables that is related to ReactNativeDependencies:
RCT_USE_DEP_PREBUILD
: If set to 1, ReactNativeDependencies will be built from source.RCT_DEPS_VERSION
: If set to 1, it will override the version of ReactNativeDependencies to be used.Changelog:
[INTERNAL] - Moved third-party dependencies to be consumed via ReactNativeDependencies podspec
Test Plan:
✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs
✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities