Regression from PR #47458: Cannot install React Native from Git anymore
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 127k
- 派生
- 25.3k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 4
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 packages/react-native/scripts/codegen/generate-artifacts-executor.js 中的 shouldSkipGenerationForRncore 开始,将所引用的早期行为与当前的 ReactCommon 检查进行比较。使用 issue 中的 Git 安装复现步骤和 bundle exec pod install 验证生成路径。安装后 rncore 目录存在且 iOS 项目可以构建,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, react-native
- 领域
- build-system, mobile
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 描述清楚
- 新手友好度
- 65/100