react / react/react-native

build failing with react native@0.81.5

オープン 初心者向け
#58,448 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

Needs: Author Feedback Needs: Repro
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

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.

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ReactCommon/react/renderer/core/graphicsConversions.h から始めて、React Native 0.81.5 のビルド失敗を再現します。Issue に示されているパーセント値の変換を周囲のコードと比較し、その後、patch-package の回避策なしでプロジェクトがビルドできることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, react-native
領域
build-system, mobile
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
85/100

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

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