graphprotocol / graphprotocol/graph-node
Add useful error messages/types to Result<T, ()>
まだ誰も着手していません。
- 主要言語
- Rust
- スター
- 3.2k
- フォーク
- 1.1k
- 平均マージ
- 4日 1時間
- マージ済み PR(30日)
- 1
説明
There are multiple functions that return Result<T, ()> in the code, this is equivalent to Option<T>, however instead of changing those to optional types, these should return useful error messages/types so it's easier to debug.
Some of them could just return &str/String but preferably they should return a proper error type or just an instance of anyhow. If for any of them you decide to create new error types, consider using the crate thiserror 🙂
If you never used any of these crates mentioned above, take a look at our codebase, you'll find usages of both. And if you're doing something outside of the graph crate/folder, you might want to import those from it's prelude module.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされた例の graph/src/data/subgraph/mod.rs から始め、次にコードベース内で Result<T, ()> を返す関数を検索します。既存の anyhow と thiserror の使用箇所を確認し、有用なエラーメッセージや型を決定する前に、各候補の失敗ケースを整理します。完了の条件は、特定したコードパス全体で、関連する unit 風の結果がエラー情報を破棄しなくなることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- backend
- issue の種類
- リファクタリング
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100