Provide more detailed I/O errors
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
The UIoError only contains an std::io::Error and some context and both aren't really accessible. For people that use uucore as a library that makes it very hard to build good errors from that. It would be really nice if that error type could expose the std::io::Error, a path that failed if it happened at some path and maybe even an index for commands that take multiple paths like cp or mv. I think restructuring UIoErrors in that direction would also harmonize error messages across the different binaries and you maybe don't need to use as many custom contexts anymore.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the UIoError definition and its call sites, then inspect how std::io::Error and context are currently stored and rendered. The work is done when library users can access the underlying error, an optional failed path, and an optional path index, with error messages consistent across the affected commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100