Unused dependencies #1964

Open
opened 2026-07-11 22:06:18 +00:00 by ezera · 0 comments
Contributor

I ran cargo shear on 6858e1b8, and it reported a number of unused dependencies:

shear/summary

  ✗ 44 errors
  ⚠ 19 warnings

c10y is a complex project, so there may be false positives, but it's likely there are some dependencies that can be pruned. That would help build times, reduce binary size, and is generally a good idea.

The process should be as easy as easy as running cargo shear --fix (or cargo shear --expand --fix), and testing that everything still builds. If the build doesn't work, cargo shear can be configured to ignore specific dependencies it identifies as false positives.

After that, we'd ideally want to add cargo shear as a step in CI, so that if any dependency becomes unused in the future, it can be removed.

If there is interest, I am happy to give this a go.

I ran [`cargo shear`](https://github.com/Boshen/cargo-shear) on 6858e1b8, and it reported a number of unused dependencies: ``` shear/summary ✗ 44 errors ⚠ 19 warnings ``` c10y is a complex project, so there may be false positives, but it's likely there are some dependencies that can be pruned. That would help build times, reduce binary size, and is generally a good idea. The process should be as easy as easy as running `cargo shear --fix` (or `cargo shear --expand --fix`), and testing that everything still builds. If the build doesn't work, `cargo shear` can be configured to ignore specific dependencies it identifies as false positives. After that, we'd ideally want to add `cargo shear` as a step in CI, so that if any dependency becomes unused in the future, it can be removed. If there is interest, I am happy to give this a go.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity#1964
No description provided.