refactor(core): split typed_api.rs and move its inline tests out
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
Start with aimdb-core/src/typed_api.rs and its inline tests, then inspect aimdb-core/src/typed_record.rs and aimdb-core/src/session/client.rs to understand the module conventions and feature gates. Split the typed API concerns into the suggested modules, preserve public paths, and reorganize the tests around shared mocks; assess whether typed_record's gated blocks can use internal helpers. Done when the files are easier to navigate and the refactor introduces no behavior change.
索引モデルが issue の本文から書いたものです。
説明
Problem
A few aimdb-core modules have grown well past the size where they are easy to navigate or review.
aimdb-core/src/typed_api.rs— 3,748 lines. The non-test part (lines 1–1783) holds five separate concerns:Producer<T>(104),Consumer<T>(226),RecordRegistrar(468),OutboundLinkBuilder(917) andInboundLinkBuilder(1241). The remaining ~1,960 lines are one inlinemod testscontaining five hand-written mock trait impls whose methods areunimplemented!("not needed for … tests")(lines 1837, 1861, 2968, 3062, 3261).aimdb-core/src/typed_record.rs— 1,726 lines, 54cfg(feature …)gates, the highest gate density in the workspace, plus four#[allow(unused_mut)](858, 1167, 1203, 1279) that exist only because of those gates.aimdb-core/src/session/client.rs— 1,685 lines (tests from line 1013).
Suggested work
- Turn
typed_api.rsinto atyped_api/module:producer.rs,consumer.rs,registrar.rs,link_outbound.rs,link_inbound.rs, re-exported frommod.rsso the public paths do not change. - Move the inline tests into per-concern test modules and share one mock connector/runtime between them instead of five partial mocks.
- For
typed_record.rs, look at whether the gated blocks can be grouped behind a small number of internal helper functions so theunused_mutallows disappear.
No behaviour change intended; purely a move/re-organise refactor.
Notes
Line numbers are from the tree at d9c7be0. Sizes were measured with wc -l; the split points are the first top-level #[cfg(test)] in each file.
- 主要言語
- Rust
- スター
- 101
- フォーク
- 20
- 平均マージ
- 2時間 33分
- マージ済み PR(30日)
- 90
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aimdb-dev/aimdb のほかの issue
-
🏷️ good first issue enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
aimdb-dev/aimdb の issue をすべて見る
似ている issue
-
Panic on live viewport resize when unstyled elements exist in display: none subtree対応中かも @GoCoder7 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
DioxusLabs/blitz#1488 ·
メンテナーはふだん 1 日以内に返信
-
S-Needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
vectordotdev/vrl#2042 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信