react / react/react-native

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

Đang mở
#50,460 10 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Impact: Regression Needs: Attention Needs: Repro Needs: Version Info
Ngôn ngữ chính
C++
Star
127k
Fork
25.3k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
4

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu trong packages/react-native/scripts/codegen/generate-artifacts-executor.js tại shouldSkipGenerationForRncore và so sánh hành vi trước đây được tham chiếu với kiểm tra ReactCommon hiện tại. Sử dụng reproducer cài đặt Git của issue và bundle exec pod install để xác minh đường dẫn tạo. Được xem là hoàn tất khi thư mục rncore tồn tại sau khi cài đặt và dự án iOS có thể build.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, react-native
Lĩnh vực
build-system, mobile
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
65/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.