Rust codegen: RustValueModelGenerator omits RustReferencedTypeGenerator.addDefinitions for callback/future properties
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust, typescript
- Lĩnh vực
- backend, build-system
Hướng nghiên cứu
Bắt đầu tại compiler/compiler/Compiler/Sources/Generation/Rust/RustValueModelGenerator.swift và đọc RustValueModelGenerator.write() cùng với cách xử lý kiểu được tham chiếu trong RustFunctionGenerator, RustModuleGenerator và RustProxyGenerator. Issue nêu việc bọc các tệp được tạo bằng RustReferencedTypeGenerator.addDefinitions(requiredBy: properties.map(\.type), to: ...); hãy xác nhận các định nghĩa Rust thu được bao quát các thuộc tính callback và Promise, đồng thời Rust được tạo ra biên dịch được.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found while reviewing https://github.com/Snapchat/Valdi/pull/211 (native Rust code generation). Not blocking that PR.
RustValueModelGenerator omits RustReferencedTypeGenerator.addDefinitions for callback/future properties
File: compiler/compiler/Compiler/Sources/Generation/Rust/RustValueModelGenerator.swift
When a TypeScript @ExportModel value model has a callback or Promise property, the generated Rust file references <Model><Property>Callback or <Model><Property>Future types that are never defined, causing Rust compilation to fail. Unlike RustFunctionGenerator, RustModuleGenerator, and RustProxyGenerator, RustValueModelGenerator.write() passes RustGeneratedFiles directly to RustNativeSourceGenerator.generate without calling RustReferencedTypeGenerator.addDefinitions.
Wrap the RustGeneratedFiles argument in RustReferencedTypeGenerator.addDefinitions(requiredBy: properties.map(\.type), to: ...) so referenced callback and future definitions are emitted.
- Ngôn ngữ chính
- C++
- Star
- 16.4k
- Fork
- 539
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 Snapchat/Valdi
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Rust codegen: RustMethodResolver fails to unwrap .nullable on optional interface/module methodsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
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 83/100
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 82/100
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 83/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Snapchat/Valdi
Issue tương tự
-
RTL-SDR: re-enumerating while streaming removes the in-use entry from the device selection dialogCó thể đã có người làm @dpc00 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
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 67/100
throneproj/Throne#2227 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
deepseek-ai/DeepGEMM-Ascend#49 ·
Maintainer thường phản hồi trong vòng 1 ngày