cargo-rbmt: revamp dupe check#74
Merged
tcharding merged 3 commits intorust-bitcoin:masterfrom Feb 27, 2026
Merged
Conversation
Member
|
I know we cannot exclude them from the lock files but if we can from the lint command that seems reasonable to me. |
1e6f774 to
6a633e8
Compare
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.
Collaborator
Author
|
@tcharding just a heads up, kinda went ham on this one, totally different from when you last looked. |
tcharding
approved these changes
Feb 27, 2026
Member
|
utACK bb63ea2 - yeah, "wild" :). This is a pretty cool approach. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I went on a journey learning about the
cargo treecommand.Exclude dev deps
Curious if any strong feelings or previous learnings here. I am trying to use
cargo-rbmtin the bip324 repo and the dev-dependencies there are a little gross. Specifically, thetokiotest framework has some dupe deps. So thebip324package 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.