Consider adding switch to opt out of options type name disambiguation
- Ngôn ngữ chính
- Rust
- Star
- 7
- Fork
- 11
- Merge trung bình
- 2 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 5
Mô tả
For `FooClient`, all client/client method options will have the prefix `FooClient`. This is to disambiguate the case when an SDK contains multiple clients and two (or more) clients have a method with the same name (e.g. `SomeMethod`), Without the prefix, `SomeMethodOptions` would collide.
For SDKs with a single client, and that will _always_ have a single client, the prefix is unnecessary and creates ugly names. We could consider adding a switch to opt out of this prefix. It works IFF an SDK contains a single client, else an error is generated (this is what we do in the go emitter). Note that opting in and then later opting out would result in a breaking change. So, one must be 100% confident that the SDK in question will always contain only one client.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xem xét hành vi đặt tên kiểu tùy chọn của Rust emitter và so sánh với cách Go emitter xử lý một client duy nhất. Xác định switch opt-out thuộc về đâu, nhiều client sẽ tạo ra lỗi như thế nào, và xác minh rằng các SDK có một client duy nhất bỏ qua tiền tố client mà không thay đổi hành vi mặc định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- tooling
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100