-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
v2.11.0 causing diffs in Podfile.lock depending on if it was built on an ARM or x86 machine #3696
Comments
Hey! 👋 The issue doesn't seem to contain a minimal reproduction. Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem? |
Facing a similar issue with the checksum changing in CI. My local machine is M1 and the build machine is an Intel Mac machine. The node_module/react-native-reanimated seems exactly the same when diffed, but the checksum ends up being different in podfile.lock. EDIT: also downgrading to v2.10.0 fixes it. |
Hey @shamilovtim, thanks for reporting this issue. At this moment the root cause of this issue is unknown to me. I've tried installing Reanimated in a fresh RN 0.68.3 app both on M1 and Intel machine but obviously the hashes are different due to different project paths. I found this issue in CocoaPods repo (CocoaPods/CocoaPods#11455) and compared Edit: actually, Edit: I was able to reproduce the issue on CI as well. Edit: I've submitted a PR #3701 that should fix this issue. |
## Description Fixes #3696. When compiling Reanimated 3.0.0-rc.3+ for iOS, we need to import `RuntimeAdapter.h`. This file exists in two locations: ``` $ find . -name RuntimeAdapter.h ./node_modules/react-native/ReactCommon/hermes/inspector/RuntimeAdapter.h ./ios/Pods/Headers/Private/React-hermes/reacthermes/RuntimeAdapter.h ``` For some reason I can't remember we couldn't use the instance from `Pods/Headers/Private`. So we need to use the one from node_modules and add `node_modules/react-native/ReactCommon` to `HEADER_SEARCH_PATHS`. When running `pod install`, CocoaPods generates `RNReanimated.podspec.json`. The content of this file affects the checksum (md5 hash) of `RNReanimated` in `Podfile.lock`. Currently, `HEADER_SEARCH_PATHS` contains the absolute path to `ReactCommon` directory. Since the path is absolute, it also contains the project root path, which is different between CI and local development, thus affects the checksum in `Podfile.lock`. This also affects v2 releases as we unified RNReanimated.podspec for 2.x and 3.x. This PR changes the path to `ReactCommon` directory from absolute to relative from `$(PODS_ROOT)` which can be obtained as `Pod::Config.instance.project_pods_root` in Podspec. Another option is to `#import <React-hermes/reacthermes/RuntimeAdapter.h>` instead of `<hermes/inspector/RuntimeAdapter.h>` and entirely remove path to `ReactCommon` directory from `HEADER_SEARCH_PATHS`. Checked on a fresh RN 0.65.2 app with Reanimated installed from package.
Fixes #3696. When compiling Reanimated 3.0.0-rc.3+ for iOS, we need to import `RuntimeAdapter.h`. This file exists in two locations: ``` $ find . -name RuntimeAdapter.h ./node_modules/react-native/ReactCommon/hermes/inspector/RuntimeAdapter.h ./ios/Pods/Headers/Private/React-hermes/reacthermes/RuntimeAdapter.h ``` For some reason I can't remember we couldn't use the instance from `Pods/Headers/Private`. So we need to use the one from node_modules and add `node_modules/react-native/ReactCommon` to `HEADER_SEARCH_PATHS`. When running `pod install`, CocoaPods generates `RNReanimated.podspec.json`. The content of this file affects the checksum (md5 hash) of `RNReanimated` in `Podfile.lock`. Currently, `HEADER_SEARCH_PATHS` contains the absolute path to `ReactCommon` directory. Since the path is absolute, it also contains the project root path, which is different between CI and local development, thus affects the checksum in `Podfile.lock`. This also affects v2 releases as we unified RNReanimated.podspec for 2.x and 3.x. This PR changes the path to `ReactCommon` directory from absolute to relative from `$(PODS_ROOT)` which can be obtained as `Pod::Config.instance.project_pods_root` in Podspec. Another option is to `#import <React-hermes/reacthermes/RuntimeAdapter.h>` instead of `<hermes/inspector/RuntimeAdapter.h>` and entirely remove path to `ReactCommon` directory from `HEADER_SEARCH_PATHS`. Checked on a fresh RN 0.65.2 app with Reanimated installed from package.
## Description Fixes software-mansion#3696. When compiling Reanimated 3.0.0-rc.3+ for iOS, we need to import `RuntimeAdapter.h`. This file exists in two locations: ``` $ find . -name RuntimeAdapter.h ./node_modules/react-native/ReactCommon/hermes/inspector/RuntimeAdapter.h ./ios/Pods/Headers/Private/React-hermes/reacthermes/RuntimeAdapter.h ``` For some reason I can't remember we couldn't use the instance from `Pods/Headers/Private`. So we need to use the one from node_modules and add `node_modules/react-native/ReactCommon` to `HEADER_SEARCH_PATHS`. When running `pod install`, CocoaPods generates `RNReanimated.podspec.json`. The content of this file affects the checksum (md5 hash) of `RNReanimated` in `Podfile.lock`. Currently, `HEADER_SEARCH_PATHS` contains the absolute path to `ReactCommon` directory. Since the path is absolute, it also contains the project root path, which is different between CI and local development, thus affects the checksum in `Podfile.lock`. This also affects v2 releases as we unified RNReanimated.podspec for 2.x and 3.x. This PR changes the path to `ReactCommon` directory from absolute to relative from `$(PODS_ROOT)` which can be obtained as `Pod::Config.instance.project_pods_root` in Podspec. Another option is to `#import <React-hermes/reacthermes/RuntimeAdapter.h>` instead of `<hermes/inspector/RuntimeAdapter.h>` and entirely remove path to `ReactCommon` directory from `HEADER_SEARCH_PATHS`. Checked on a fresh RN 0.65.2 app with Reanimated installed from package.
Description
We run CI on an x86 macOS container. My personal machine is an M1 Max. After bumping 2.10.0 -> 2.11.0 of reanimated we're getting non deterministic diffs in the Podfile.lock md5 hash depending on if Pods were built on an ARM machine or x86 machine
This causes our project to fail building on CI:
Since the Pod is constructed locally, I assume the problem is in the source code of a podspec change to 2.11.0. And indeed, the Podspec did change: 2.10.0...2.11.0#diff-2f3e36d153f0b1ce894c5dd8afad3b4119dd38054d65d7a593f60cf2762edf1a.
Steps to reproduce
yarn
on an x86 machineyarn
on an M1 machineThere should be a diff in Podfile.lock
Snack or a link to a repository
N/A build issue
Reanimated version
2.11.0
React Native version
0.68.3
Platforms
iOS
JavaScript runtime
JSC
Workflow
Expo bare workflow
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: