C++ API snapshots: `ReactCommon` and `ReactAndroid` read the tvOS view headers, as `scripts/cxx-api/config.yml` does not exclude `*/platform/tvos/*`

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

メンテナーはふだん 2 日以内に返信

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

評価

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

調査の方向性

まず scripts/cxx-api/config.yml にある ReactCommon、ReactAndroid、ReactApple の exclude_patterns を読み、issue に記載されたプラットフォームのパスと比較します。再現スクリプトは除外設定とコミット済みの API スナップショットを確認します。checkout に対して bash repro.sh を実行し、現在の結果を確認してください。ReactCommon と ReactAndroid が tvOS ヘッダーを除外し、該当するスナップショットに tvOS のクラスが含まれなくなり、他のプラットフォームの除外設定が維持されていれば完了です。

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

説明

Needs: Attention Needs: Version Info Platform: Android Platform: tvOS
Description

scripts/cxx-api/config.yml leaves each view platform folder out of the snapshots that are not for it: ReactCommon excludes */platform/cxx/*, windows, macos, ios and android (L27-L33), and ReactAndroid excludes cxx, windows, macos and ios (L58-L65). Neither names */platform/tvos/*, so both read ReactCommon/react/renderer/components/view/platform/tvos/:

  • all four ReactCommon*Cxx.api list class facebook::react::HostPlatformViewProps with public bool focusable;, which only the tvOS header declares (L28);
  • each ReactAndroid*Cxx.api merges the tvOS HostPlatformViewProps into Android's. On main both declare bool focusable{false};, so it does not show; https://github.com/react/react-native/pull/59048 makes Android's std::optional<bool> focusable{}, and its regenerated ReactAndroidDebugCxx.api lists both public bool focusable; and public std::optional<bool> focusable; in the one class.

ReactApple does not exclude */platform/tvos/* either, and it does exclude */platform/cxx/*, the folder React-Fabric.podspec compiles for iOS (L168), so ReactAppleDebugCxx.api lists the tvOS class where iOS has using HostPlatformViewProps = BaseViewProps;.

Steps to reproduce
  1. Run bash repro.sh from the reproducer below. It sparse-clones main, matches each view platform's HostPlatformViewProps.h against each snapshot's exclude_patterns in scripts/cxx-api/config.yml (with the template's */tests/* and */samples/*), and prints the HostPlatformViewProps class of the committed ReactCommon*Cxx.api and ReactAndroidDebugCxx.api. bash repro.sh <path to a react-native checkout> reads a checkout instead.

Expected: ReactCommon and ReactAndroid read nothing under platform/tvos, so no ReactCommon*Cxx.api lists a HostPlatformViewProps class and the ReactAndroid*Cxx.api class holds Android's members only; their other platform exclusions stay as they are.
Actual: both read platform/tvos/.../HostPlatformViewProps.h, and all four ReactCommon*Cxx.api list the tvOS class with public bool focusable; (log below).

React Native Version

main at bbfd391496 (nightly)

Affected Platforms

Other (please specify): the C++ API snapshots in scripts/cxx-api

Output of npx @react-native-community/cli info
Not applicable: this is the configuration of React Native's own C++ API snapshots. The reproducer's run:
react-native bbfd391 (2026-11-19), MINGW64_NT-10.0-26300 3.6.10-5a1665c8.x86_64, bash 5.3.15(2)-release
Stacktrace or Logs
react-native bbfd391 (2026-11-19), MINGW64_NT-10.0-26300 3.6.10-5a1665c8.x86_64, bash 5.3.15(2)-release
platform/android/.../HostPlatformViewProps.h:44:  bool focusable{false};
platform/cxx/.../HostPlatformViewProps.h:15:using HostPlatformViewProps = BaseViewProps;
platform/tvos/.../HostPlatformViewProps.h:28:  bool focusable{false};
config.yml ReactCommon exclude_patterns naming a platform folder: */platform/cxx/* */platform/windows/* */platform/macos/* */platform/ios/* */platform/android/*
  ReactCommon reads HostPlatformViewProps.h from: platform/tvos
config.yml ReactAndroid exclude_patterns naming a platform folder: */platform/cxx/* */platform/windows/* */platform/macos/* */platform/ios/*
  ReactAndroid reads HostPlatformViewProps.h from: platform/android platform/tvos
config.yml ReactApple exclude_patterns naming a platform folder: */platform/cxx/* */platform/windows/* */platform/macos/* */platform/android/*
  ReactApple reads HostPlatformViewProps.h from: platform/tvos
ReactCommonDebugCxx.api:
  676: class facebook::react::HostPlatformViewProps : public facebook::react::BaseViewProps {
  679:   public bool focusable;
ReactCommonFrameworksCxx.api:
  1238: class facebook::react::HostPlatformViewProps : public facebook::react::BaseViewProps {
  1241:   public bool focusable;
ReactCommonNewarchCxx.api:
  675: class facebook::react::HostPlatformViewProps : public facebook::react::BaseViewProps {
  678:   public bool focusable;
ReactCommonReleaseCxx.api:
  675: class facebook::react::HostPlatformViewProps : public facebook::react::BaseViewProps {
  678:   public bool focusable;
ReactAndroidDebugCxx.api:
  1329: class facebook::react::HostPlatformViewProps : public facebook::react::BaseViewProps {
  1333:   public bool focusable;
SUMMARY: snapshots whose exclude_patterns let them read platform/tvos/.../HostPlatformViewProps.h: ReactCommon ReactAndroid; committed ReactCommon snapshots with class facebook::react::HostPlatformViewProps: ReactCommonDebug ReactCommonFrameworks ReactCommonNewarch ReactCommonRelease
MANDATORY Reproducer

https://gist.github.com/YevheniiKotyrlo/d19e454d6ff5635c01ac24ce902e513e — bash repro.sh exits 1 while ReactCommon or ReactAndroid reads platform/tvos or a committed ReactCommon*Cxx.api lists class facebook::react::HostPlatformViewProps, and 0 once neither holds.

Screenshots and Videos

No response

主要言語
C++
スター
127k
フォーク
25.5k
平均マージ
3日 17時間
マージ済み PR(30日)
302

環境構築

はじめの一歩

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

react/react-native のほかの issue

react/react-native の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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