react / react/react-native

Regression from PR #47458: Cannot install React Native from Git anymore

オープン
#50,460 コメント 10 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Impact: Regression Needs: Attention Needs: Repro Needs: Version Info
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
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: rncore is pre-generated using the prepack script
    • When installing from Git: rncore gets generated when running pod install
  • Current behavior:
    • When installing from NPM: rncore is pre-generated using the prepack script
    • When installing from Git: rncore will NOT get generated when running pod install because .../ReactCommon is detected as exists even though .../ReactCommon/react/renderer/components/rncore does not
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。