Consider adding switch to opt out of options type name disambiguation
- 主要言語
- Rust
- スター
- 7
- フォーク
- 11
- 平均マージ
- 2日 5時間
- マージ済み PR(30日)
- 5
説明
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.
コントリビューションガイド
調査の方向性
まず、Rust emitter のオプション型の命名動作を確認し、Go emitter の単一クライアントの処理と比較します。オプトアウトスイッチをどこに配置するか、複数のクライアントがどのようにエラーを発生させるべきかを定義し、単一クライアントの SDK がデフォルトの動作を変更せずにクライアントプレフィックスを省略することを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100