navigation:codegen: optional number and boolean params break the iOS build
メンテナーはふだん 3 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- react-native, swift, typescript
- 領域
- build-system, mobile
調査の方向性
Start with brownfield.navigation.ts and the navigation:codegen generator, then inspect the generated Swift protocol and Objective-C implementation alongside the React Native TurboModule spec. Reproduce with the optional number and boolean parameters shown in the issue and build the iOS app. Done when the generated iOS code compiles and represents both optional parameters as nullable NSNumber * values.
索引モデルが issue の本文から書いたものです。
説明
The docs state that optional params are supported in brownfield.navigation.ts. For optional number and boolean params, brownfield navigation:codegen generates a Swift delegate that doesn't compile.
Steps to reproduce
-
Add a method with optional primitive params to
brownfield.navigation.ts:export interface BrownfieldNavigationSpec { openFeed(page?: number, animated?: boolean): void; } -
Run
npx brownfield navigation:codegen. -
Build the iOS app.
Expected behavior
The generated code compiles, and the params are nullable on iOS, as NSNumber * in the React Native TurboModule spec.
Actual behavior
The generated Swift protocol contains:
@objc func openFeed(_ page: Double?, animated animated: Bool?)
Swift reports "Method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C". The Objective-C implementation declares (double)page and (BOOL)animated, while React Native codegen declares both params as NSNumber *.
- 主要言語
- TypeScript
- スター
- 553
- フォーク
- 58
- 平均マージ
- 3日 18時間
- マージ済み PR(30日)
- 16
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/react-native-brownfield のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
callstack/react-native-brownfield#502 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
Android: initialize cannot be retried after it throws対応中かも @malopezr7 が 8 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
callstack/react-native-brownfield#515 ·
メンテナーはふだん 3 日以内に返信
-
`package:ios --add-spm-package`: allow project-declared extra XCFrameworks as binary targets対応中かも @DanielPotorCK が 10 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
callstack/react-native-brownfield#468 ·
メンテナーはふだん 3 日以内に返信
-
iOS: emitOnBrownfieldMessage: can crash with std::bad_function_call when native posts before JS requires the TurboModule (cold-start race)対応中かも @tlq5l が 7 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
callstack/react-native-brownfield#420 ·
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
callstack/react-native-brownfield#406 ·
メンテナーはふだん 3 日以内に返信
callstack/react-native-brownfield の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
documentation easy good first issue help wanted
難易度 1/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
Billion-context documentation addendum: nudge is independent of window occupancy. | billion-context 文档补充:nudge 与窗口占用无关対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
ranxianglei/billion-context#5893 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
microsoft/monaco-editor#5575 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100