Closed Anonyfox closed 3 years ago
Thanks for reporting! This is interesting as it seems pretty clear where this issue stems from:
cargo package
is executed to get a list of all paths that it would want to include in the package. This is later used to build a tar archive. For some reason cargo package
lists paths that are not present on disk.
The fix would be trivial - ignore non-existing files - but I wonder what you think about this before implementing it.
In my case prio#1 would be that the tool does not die because of this, since I execute it in a loop over all crates within my workspace during CI. Of course it would be helpful if cargo package
itself does not return such false positives, but in the short term I'd gladly take the tradeoff that ignores things even if this means not-as-optimal shrinking. Thoughts?
Please let me know if v1.2.1 works for you.
Worked this night without issues, thank you!
When I delete a folder with code from a crate in my workspace,
cargo diet
dies with the errorError: Could not open "src/workspace/constructor.rs" for reading file meta-data
, whereworkspace
is the folder containing some code. If it exists (even when the files contained are empty), it works. If I delete any file (or even the whole folder), I get the error above.