navigation:codegen: optional number and boolean params break the iOS build
Maintainer thường phản hồi trong vòng 3 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react-native, swift, typescript
- Lĩnh vực
- build-system, mobile
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 *.
- Ngôn ngữ chính
- TypeScript
- Star
- 553
- Fork
- 58
- Merge trung bình
- 3 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstack/react-native-brownfield
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
callstack/react-native-brownfield#502 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Android: initialize cannot be retried after it throwsCó thể đã có người làm @malopezr7 đã nhận 8 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 57/100
callstack/react-native-brownfield#515 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
`package:ios --add-spm-package`: allow project-declared extra XCFrameworks as binary targetsCó thể đã có người làm @DanielPotorCK đã nhận 10 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
callstack/react-native-brownfield#468 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
iOS: emitOnBrownfieldMessage: can crash with std::bad_function_call when native posts before JS requires the TurboModule (cold-start race)Có thể đã có người làm @tlq5l đã nhận 7 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
callstack/react-native-brownfield#420 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
callstack/react-native-brownfield#406 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của callstack/react-native-brownfield
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation easy good first issue help wanted
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Billion-context documentation addendum: nudge is independent of window occupancy. | billion-context 文档补充:nudge 与窗口占用无关Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
ranxianglei/billion-context#5893 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
microsoft/monaco-editor#5575 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100