refactor: revisit the triplicated buffer implementations across the tokio / embassy / wasm adapters
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- backend, embedded-iot
調査の方向性
Read docs/design/035-review-followups-deferred.md §2.3 and docs/design/038-technical-debt-and-simplification-review.md §2.3 / §3.2, then compare the buffer read paths in the three adapter files named in the issue. Check whether the documented tripwire has been hit by the late-join snapshot and record.get changes. Done means either recording a re-confirmation in 035 and closing the issue, or writing the shared core implementation design described in 038.
索引モデルが issue の本文から書いたものです。
説明
Problem
The three runtime adapters each hand-build the same three buffer semantics (SPMC ring, single-latest, mailbox):
| File | Lines | Of which inline tests start at |
|---|---|---|
aimdb-tokio-adapter/src/buffer.rs |
1,634 | line 611 |
aimdb-embassy-adapter/src/buffer.rs |
963 | line 628 |
aimdb-wasm-adapter/src/buffer.rs |
757 | line 478 |
Each also carries a high density of feature gates (32, 29 and 26 cfg(feature …) occurrences respectively). This is the largest structural duplication left in the workspace: a behavioural fix or a new buffer feature has to be written and tested three times, and parity between them is only enforced by tests.
Prior decisions
This is not new:
docs/design/038-technical-debt-and-simplification-review.md§2.3 / §3.2 proposed one portable buffer implementation in core and estimated about 2,000 lines net removed (breaking for adapter authors only).docs/design/035-review-followups-deferred.md§2.3 decided "keep, with a tripwire" for the buffer-ext trait triplication.
So this issue is a request to re-check that decision, not to overturn it by default.
Suggested work
- Check whether the tripwire condition recorded in 035 §2.3 has been hit since (e.g. by the recent late-join snapshot and
record.getchanges, which touched buffer read paths). - If it has, or if the cost has grown, write the design for a shared core implementation as 038 §3.2 sketched.
- If not, record the re-confirmation in 035 and close this.
Notes
Line counts are from the tree at d9c7be0. I did not diff the three implementations line by line, so the amount of truly shareable code is the 038 estimate, not something I measured.
- 主要言語
- 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 日以内に返信