lowRISC / lowRISC/manticore

Track error conversion locations using #[track_caller]

Open
#155 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
17
Forks
11
PR merge metrics
No merged PRs in 30d

Description

#123 added a crate-wide `Error` type and some helper macros to add logs gated by the `log` feature. One _could_ use the new macros everywhere to provide additional context to errors for debugging. But it might be possible to use `#[track_caller]` and `core::panic::Location` to automatically track and log where errors originate and where they get converted to other error types, eliminating a bunch of tedious work. Investigate this and implement if possible.

#### References
* https://github.com/rust-lang/rust/issues/87401
* https://github.com/lowRISC/manticore/pull/123#discussion_r836963963

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the crate-wide Error type and helper macros introduced by #123, then read Rust issue #87401 and the referenced discussion on pull request #123. Determine whether #[track_caller] and core::panic::Location can capture both error origins and conversions, and treat the issue as done only if the approach is feasible and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.