navigation:codegen: optional number and boolean params break the iOS build
Maintainer antworten meist innerhalb von 3 Tagen
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- react-native, swift, typescript
- Bereich
- build-system, mobile
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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 *.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 553
- Forks
- 58
- Ø Merge
- 3 T. 18 Std.
- Gemergte PRs (30 T.)
- 16
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus callstack/react-native-brownfield
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
callstack/react-native-brownfield#502 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Android: initialize cannot be retried after it throwsEvtl. vergeben @malopezr7 hat das vor 8 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 57/100
callstack/react-native-brownfield#515 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
`package:ios --add-spm-package`: allow project-declared extra XCFrameworks as binary targetsEvtl. vergeben @DanielPotorCK hat das vor 10 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
callstack/react-native-brownfield#468 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
iOS: emitOnBrownfieldMessage: can crash with std::bad_function_call when native posts before JS requires the TurboModule (cold-start race)Evtl. vergeben @tlq5l hat das vor 7 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
callstack/react-native-brownfield#420 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 38/100
callstack/react-native-brownfield#406 ·
Maintainer antworten meist innerhalb von 3 Tagen
Alle Issues in callstack/react-native-brownfield
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
documentation easy good first issue help wanted
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 83/100
Maintainer antworten meist innerhalb von 1 Tag
-
Billion-context documentation addendum: nudge is independent of window occupancy. | billion-context 文档补充:nudge 与窗口占用无关Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 86/100
ranxianglei/billion-context#5893 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
microsoft/monaco-editor#5575 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100