Regression from PR #47458: Cannot install React Native from Git anymore
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 127k
- Forks
- 25.3k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 4
Description
Description
This PR updates shouldSkipGenerationForRncore as such it checks if .../ReactCommon exists before deciding to skip rncore generation, whereas previously it would check .../ReactCommon/react/renderer/components/rncore specifically.
This change breaks installations from Git.
I noticed this while upgrading from 0.76.2 to 0.78.1.
Per my debugging:
- Previous behavior:
- When installing from NPM:
rncoreis pre-generated using theprepackscript - When installing from Git:
rncoregets generated when runningpod install
- When installing from NPM:
- Current behavior:
- When installing from NPM:
rncoreis pre-generated using theprepackscript - When installing from Git:
rncorewill NOT get generated when runningpod installbecause.../ReactCommonis detected as exists even though.../ReactCommon/react/renderer/components/rncoredoes not
- When installing from NPM:
Steps to reproduce
npx @react-native-community/cli@latest init BuggyReactNative
cd ./BuggyReactNative/
npm install 'https://gitpkg.vercel.app/facebook/react-native/packages/react-native?0.78-stable'
cd ./ios/
bundle exec pod install
cd ..
ls ./node_modules/react-native/ReactCommon/react/renderer/components/rncore
# 💥 no such file or directory
# 💥 Xcode won't build the project
React Native Version
0.78.1
Affected Platforms
Runtime - iOS, Other (please specify)
Output of npx @react-native-community/cli info
Not relevant
Stacktrace or Logs
Not relevant
Reproducer
Run the reproducer bash script so you can test with your toolchain not mine
Screenshots and Videos
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/react-native/scripts/codegen/generate-artifacts-executor.js at shouldSkipGenerationForRncore and compare the referenced earlier behavior with the current ReactCommon check. Use the issue's Git installation reproducer and bundle exec pod install to verify the generation path. Done means the rncore directory exists after installation and the iOS project can build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100