bnjbvr / cargo-machete

Remove unused Rust dependencies with this one weird trick!
MIT License
722 stars 29 forks source link

Related dependencies are signed as unused but they are not #128

Closed neutrinoks closed 1 month ago

neutrinoks commented 3 months ago

Hello guys,

I faced an issue when using the cargo machete and the proptest and proptest-derive crates. In my current project, they are marked as optional (not sure if this is relevant). Machete suggests removing protest because it is not used obviously in the code, but I will get compilation errors when I remove it. It is needed when using the derive macro Arbitrary of protest-derive. Unfortunately it is a private repository and I cannot share it.

Regards, Michael

bnjbvr commented 2 months ago

Hi! Can you make another public example repository which reproduces the issue, please?

neutrinoks commented 2 months ago

Hi! Can you make another public example repository which reproduces the issue, please?

I will need some time to reproduce this on another repo or similar mockup but I will try it :+1: But I have realised so far that Machete does sign optional crates to be removed. Is that supposed to be so?

neutrinoks commented 1 month ago

Unfortunately, I am too busy currently, and because the effects I had were in a huge private repo, it is hard to reproduce that in a mockup project. I will observe it and come back to this issue later again.