frewsxcv / rust-crates-index

Rust library for retrieving and interacting with the crates.io index
https://docs.rs/crates-index/
Apache License 2.0
72 stars 37 forks source link

Got "no such file or directory" error #63

Closed epage closed 3 years ago

epage commented 3 years ago
failed to stat '/Users/runner/.cargo/registry/index/github.com-1ecc6299db9ec823/au/to/automaat-processor-git-clone': No such file or directory; class=Os (2)

https://github.com/killercup/cargo-edit/pull/484/checks?check_run_id=3445952771

I'm a bit baffled at why this would happen. We've done a build, so the registry should be populated. This a problem with index vs workspace and concurrent updating of workspace? I think I saw that the new version will be bypassing the workspace completely, which would remove the need for adding extra locks.

kornelski commented 3 years ago

Is it reproducible?

Is it possible that some other process was modifying the repo at the same time?

kornelski commented 3 years ago

Oh I see, you're using the latest published version, where Index uses checkout-based access. The crates-index crate is moving to use bare-repo-based access, which is closer to what Cargo uses. In the latest published version that's BareIndex. It's going to be the only implementation going forward.

epage commented 3 years ago

That seemed to work. Look forward to the new version since the docs point people to Index without clear distinction of when to not use it (ever?).