Skip to content

Conversation

@dimartiro
Copy link
Contributor

@dimartiro dimartiro commented Sep 19, 2025

Description

This PR removes unused dependencies, marks some others to be ignored, and introduces a cargo-udeps check in CI to prevent regressions.

It finalizes my work started in #9235, ensuring all unnecessary dependencies are cleaned up across the project.

Note: Since there are well known false positives I've checked each one and ignore the ones that we are 100% are false positives

Closes: #6906

@dimartiro dimartiro requested review from a team and koute as code owners September 19, 2025 13:42
# name of this job must be unique across all workflows
# otherwise GitHub will mark all these jobs as required

cargo-udeps:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced to add this, there seems to be a lot of false positives that you need to handle.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point. I think the false positives would be a real problem if we had no way to deal with them. But since we can safely ignore them, I believe it’s still a useful check

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it clutters the Cargo.toml files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the trade-off is worth it — just a few extra lines to prevent unused dependencies, which would otherwise lead to bigger binaries and longer compilation times

Copy link
Contributor

@franciscoaguirre franciscoaguirre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, the trade-off of having to ignore false positives in exchange for less useless dependencies is worth it

@dimartiro
Copy link
Contributor Author

Updated based on the latest changes and unused deps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo udeps check

4 participants