cargo-machete
cargo-machete copied to clipboard
Error about non-existing file that exists
I was trying out machete
on https://github.com/apollographql/apollo-rs and came upon a weird error: it tries to read fuzz/Cargo.toml
and prints an OS error about that file not existing, but it does exist.
I've managed to reduce the issue to the cargo_toml
manifest creation:
let path = std::path::Path::new("../apollo-rs/fuzz/Cargo.toml");
println!("path: {:?}, exists: {}", path, path.exists());
let manifest = cargo_toml::Manifest::from_path(path);
println!("file manifest: {:?}", manifest);
prints on this windows machine:
path: "../apollo-rs/fuzz/Cargo.toml", exists: true
file manifest: Err(Io(Os { code: 3, kind: NotFound, message: "Le chemin d’accès spécifié est introuvable." }))
So I guess parsing this specific manifest is trying to read other files, and opening them fails, but at this point the error lacks the context of which file it is ?
Thanks for the report! Couldn't reproduce with a fresh build of cargo-machete
on Linux. Did you install cargo-machete
with cargo
? If so, I might need to release a new version. Which OS are you using, out of curiosity?
I just cloned machete as of 3 days ago, it was not cargo installed. The error occurred on windows and ubuntu under WSL, so I suspect it's some windows-related weirdness.
Hey @lqd, does it still happen with the latest version?
I'll check and report back.
It does not. Let's close
Thanks for checking :heart: