cockroachdb / cockroachdb/errors

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

Aperta
#70 7 commenti 7 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
2.5k
Fork
74
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.