Skip to content

cargo-rbmt: revamp dupe check#74

Merged
tcharding merged 3 commits intorust-bitcoin:masterfrom
nyonson:exclude-dev-deps
Feb 27, 2026
Merged

cargo-rbmt: revamp dupe check#74
tcharding merged 3 commits intorust-bitcoin:masterfrom
nyonson:exclude-dev-deps

Conversation

@nyonson
Copy link
Collaborator

@nyonson nyonson commented Feb 8, 2026

I went on a journey learning about the cargo tree command.

Exclude dev deps

Curious if any strong feelings or previous learnings here. I am trying to use cargo-rbmt in the bip324 repo and the dev-dependencies there are a little gross. Specifically, the tokio test framework has some dupe deps. So the bip324 package fails the rbmt lint even though the dupe deps aren't shipped downstream. I could break the tests out into a different package not part of the workspace, but kinda of a lot of overhead.

Ideally, tests don't have any dupe deps too to avoid any weird type issues, but hopefully your tests would catch those issues. Given that the goal of this lint is to protect downstream consumers from dupe deps, we can ignore dev-deps with --edges no-dev.

Workspace (cross package) check

I added another check beyond the existing per-package one. This one is more inline with what I think the OG CI script was testing for. It checks if packages in a workspace could cause issues for downstream users by introducing dupes, even if the package itself has no dupes. This is currently just logged as a warning since I need to gain a little more confidence in the check. I am curious what happens for example when the fuzz changes are merged in rust-bitcoin.

@tcharding
Copy link
Member

I know we cannot exclude them from the lock files but if we can from the lint command that seems reasonable to me.

This extends the dupe check with a more subtle check in workspaces
where a dupe exists across multiple packages. Currently logs as just
a warning since not sure on the value.
@nyonson nyonson changed the title cargo-rbmt: exclude dev-deps from dupe check cargo-rbmt: revamp dupe check Feb 20, 2026
@nyonson
Copy link
Collaborator Author

nyonson commented Feb 20, 2026

@tcharding just a heads up, kinda went ham on this one, totally different from when you last looked.

Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

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

utACK bb63ea2 - wild.

@tcharding tcharding merged commit 701cc6b into rust-bitcoin:master Feb 27, 2026
3 checks passed
@apoelstra
Copy link
Member

utACK bb63ea2 - yeah, "wild" :). This is a pretty cool approach.

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.

3 participants