react / react/react-native

build failing with react native@0.81.5

Đang mở Phù hợp với người mới
#58,448 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Needs: Author Feedback Needs: Repro
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ả

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native@0.81.5 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native/ReactCommon/react/renderer/core/graphicsConversions.h b/node_modules/react-native/ReactCommon/react/renderer/core/graphicsConversions.h
index bb59351..bcff1d7 100644
--- a/node_modules/react-native/ReactCommon/react/renderer/core/graphicsConversions.h
+++ b/node_modules/react-native/ReactCommon/react/renderer/core/graphicsConversions.h
@@ -76,8 +76,11 @@ inline folly::dynamic toDynamic(const YGValue& dimension) {
       return "stretch";
     case YGUnitPoint:
       return dimension.value;
-    case YGUnitPercent:
-      return std::format("{}%", dimension.value);
+    case YGUnitPercent: {
+      char buffer[32];
+      std::snprintf(buffer, sizeof(buffer), "%g%%", dimension.value);
+      return std::string(buffer);
+    }
   }
 
   return nullptr;

This issue body was partially generated by patch-package.

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 với ReactCommon/react/renderer/core/graphicsConversions.h và tái hiện lỗi build của React Native 0.81.5. So sánh phép chuyển đổi giá trị phần trăm được nêu trong issue với phần code xung quanh, sau đó xác minh rằng project build được mà không cần workaround bằng patch-package.

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

Đánh giá

Công nghệ
cpp, react-native
Lĩnh vực
build-system, mobile
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
85/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.