Skip to content

Conversation

@rolandnagy
Copy link

@rolandnagy rolandnagy commented Jan 16, 2026

Summary:

Fixed an issue where developers with identical development environments get different checksums for hermes-engine in Podfile.lock, causing unnecessary git conflicts.

The root cause was that hermes-engine.podspec used require.resolve() to get the absolute path to hermes-compiler, which included usernames. This caused the generated hermes-engine.podspec.json to differ across developers, resulting in different checksums.

See Issue: #54891

Changelog:

[IOS] [FIXED] - Fix hermes-engine Podfile.lock checksum inconsistency across developers

Test Plan:

  • Created a test project with local React Native changes
  • Ran pod install and verified hermes-engine.podspec.json contains
    ${PODS_ROOT}/../../node_modules/hermes-compiler path
  • Verified app builds and runs successfully with Hermes enabled
  • Verified that rn-tester app builds and runs successfully
  • Confirmed hermesc binary resolves correctly at build time

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 16, 2026
@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 Jan 16, 2026
@cortinico cortinico requested a review from cipolleschi January 16, 2026 16:49
@meta-codesync
Copy link

meta-codesync bot commented Jan 18, 2026

@philIip has imported this pull request. If you are a Meta employee, you can view this in D90932424.

Copy link
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

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.

Thanks for the attempt. This is not the right solution because we can't make assumptions on the structure of the projects. React Native is not used from the template only, but also in several brownfield scenarios we need to consider.

In the comment, I suggested a proper fix.

You can also test the fix by building the RNTesterApp locally:

# from the react-native folder
yarn install
cd packages/rn-tester
bundle install
bundle exec pod install
open RNTesterPods.xcworkspace
yarn start

Then build and run in xcode.

# For non-standard structures, use HERMES_OVERRIDE_HERMESC_PATH environment variable.
spec.user_target_xcconfig = {
'HERMES_CLI_PATH' => "#{hermes_compiler_path}/hermesc/osx-bin/hermesc"
'HERMES_CLI_PATH' => "${PODS_ROOT}/../../node_modules/hermes-compiler/hermesc/osx-bin/hermesc"
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the attempt, but this won't work.

Sure, it works for the template app specifically, but, for example, it does not work for the RNTester app we have inside the repo.

For the RNTester app, the Pods folder is located in react-native/packages/rn-tester/Pods.
Therefore ${PODS_ROOT}/../../ points to packages, which won't have a node_modules folder, so the HERMES_CLI_PATH will always fail.

The right approach here would be to keep the resolution, and then use something like Pathname#relative_path_from to compute a path that it is always correct, independently from how the project is set up.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for pointing that out! I've updated the implementation as per your suggestion to use Pathname#relative_path_from.

@rolandnagy rolandnagy force-pushed the podfile-lock-checksum/hermes-engine branch from 5d9d8b5 to 7fdc8b9 Compare January 26, 2026 05:38
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. 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