matthiaskrgr / matthiaskrgr/cargo-cache
Unhelpful error message: “No such file or directory”
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 994
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
cargo-cache has previously worked without any problems; now it doesn't:
$ cargo-cache trim --limit '1M'
thread 'main' panicked at src/commands/trim.rs:34:57:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
$ env RUST_BACKTRACE=1 cargo-cache trim --limit '1M'
thread 'main' panicked at src/commands/trim.rs:34:57:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
0: 0x558dcc8f25a2 - <unknown>
1: 0x558dcc8720d3 - <unknown>
2: 0x558dcc8f220f - <unknown>
3: 0x558dcc8f2403 - <unknown>
4: 0x558dcc8f1eee - <unknown>
5: 0x558dcc9277c8 - <unknown>
6: 0x558dcc927729 - <unknown>
7: 0x558dcc92866c - <unknown>
8: 0x558dcc76128f - <unknown>
9: 0x558dcc761795 - <unknown>
10: 0x558dcc7db6b6 - <unknown>
11: 0x558dcc7c219e - <unknown>
12: 0x558dcc779636 - <unknown>
13: 0x558dcc7ef033 - <unknown>
14: 0x7fbecac27675 - <unknown>
15: 0x7fbecac27729 - __libc_start_main
16: 0x558dcc767315 - <unknown>
17: 0x0 - <unknown>
It would be helpful if cargo-cache told me which file it expected to find, but didn't.
I am using cargo-cache packaged by ArchLinux:
Rebuilding the package locally doesn't change a thing.
- cargo-cache: 0.8.3 (3d8d5ce 2025-07-26)
- O/S: Linux x86_64
- rustc: 1.88.0
Contributor guide
No contributing guide indexed for this repository
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
Start in src/commands/trim.rs at the unwrap reported on line 34 and reproduce the failure with cargo-cache trim --limit '1M'. Trace which file operation returns the error. Done means the failure identifies the expected file instead of only reporting “No such file or directory”.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100