navigation:codegen: optional number and boolean params break the iOS build
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- react-native, swift, typescript
- Área
- build-system, mobile
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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 *.
- Lenguaje dominante
- TypeScript
- Estrellas
- 553
- Forks
- 58
- Merge medio
- 3 d 18 h
- PR fusionados (30 d)
- 16
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstack/react-native-brownfield
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
callstack/react-native-brownfield#502 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Android: initialize cannot be retried after it throwsPosiblemente ocupada @malopezr7 la tomó hace 8 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 57/100
callstack/react-native-brownfield#515 ·
Los mantenedores suelen responder en 3 días
-
`package:ios --add-spm-package`: allow project-declared extra XCFrameworks as binary targetsPosiblemente ocupada @DanielPotorCK la tomó hace 10 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
callstack/react-native-brownfield#468 ·
Los mantenedores suelen responder en 3 días
-
iOS: emitOnBrownfieldMessage: can crash with std::bad_function_call when native posts before JS requires the TurboModule (cold-start race)Posiblemente ocupada @tlq5l la tomó hace 7 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
callstack/react-native-brownfield#420 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
callstack/react-native-brownfield#406 ·
Los mantenedores suelen responder en 3 días
Todos los issues de callstack/react-native-brownfield
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
documentation easy good first issue help wanted
Dificultad 1/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
Billion-context documentation addendum: nudge is independent of window occupancy. | billion-context 文档补充:nudge 与窗口占用无关Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
ranxianglei/billion-context#5893 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
microsoft/monaco-editor#5575 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100