cockroachdb / cockroachdb/errors

Stop relying on `pkg/errors` to handle stack traces

オープン
#70 コメント 7 件 リアクション 7 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
2.5k
フォーク
74
PR マージ指標
30日以内にマージされた PR はありません

説明

Today the stack trace formatting code delegates to `pkg/errors/stack.go`.

However, that code uses `runtime.FuncForPC` and emits file paths in the stack trace derived from the raw file name of the source file.

This method is outdated, as the on-disk file name of a given package's source may be different from the package path (due to go mod versioning, reproducible build sandboxes, etc).

The "modern" equivalent is `runtime.CallersFrame`, which populates `runtime.Frame` structs with package path-qualified function names.

We want to use that instead.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start by locating the stack-trace formatting code that delegates to pkg/errors/stack.go, then compare its behavior with runtime.CallersFrame and runtime.Frame. Done means stack traces no longer rely on pkg/errors for this formatting and use package path-qualified function information instead.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
go
領域
backend
issue の種類
リファクタリング
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。