crane icon indicating copy to clipboard operation
crane copied to clipboard

Consider adding a `cargo-udeps` check function to `mkLib`

Open eureka-cpu opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. Problem: A common issue is large dependency graphs with unused dependencies that get lost in it. This is especially true for workspaces and monorepos.

Describe the solution you'd like I'd like to add a function that runs a check using cargo-udeps to report to a user that they have dependencies that are not being used.

Describe alternatives you've considered I could write my own drv and add it to checks using the cargoCommand from mkLib, but I figured I'd ask here first if it's something that the project would consider.

eureka-cpu avatar Sep 20 '24 17:09 eureka-cpu

I'm happy to take on the work to get this functioning as well

eureka-cpu avatar Sep 20 '24 17:09 eureka-cpu

Hi @eureka-cpu, I'd be willing to accept a PR that adds support for cargo-udeps!

IIRC cargo-udeps still requires using a nightly toolchain, but we don't need to go as far as trying to detect whether the toolchain is nightly or not; just let the command fail as it would and it should signal to the user to double check their toolchain. Besides that can't think of any other issues that might get in the way

ipetkov avatar Sep 22 '24 21:09 ipetkov