Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can cargo-release recursively bump versions in dependent crates? #628

Closed
thomaseizinger opened this issue Dec 20, 2022 · 2 comments
Closed

Comments

@thomaseizinger
Copy link

In a big workspace, it is not uncommon for crates to have dependencies upon each other. When one crate appears in another crate's public API, a major bump of the dependency also implies a major bump in the dependent crate.

I think it is out of scope for cargo-release to automatically detect when it needs to recursively bump versions but it would be cool if we could specify in the configuration file, when a version bump should trickle down the dependency chain.

Over at https://github.com/libp2p/rust-libp2p, we are currently trying to automate our release process and correctly bumping the versions is one of those problems that we would like to automate. For example, every crate depends on libp2p-core, so if we make a minor bump in that one (0.x), all other crates needs a minor bump too. What I'd like to have is that the command:

cargo release version --package libp2p-core minor --execute --no-confirm

also bumps the versions of all dependent crates.

I think one cannot necessarily assume that a minor bump also translates to a minor bump so what we would have to configure is, which dependencies are "exposed". This would allow cargo release to make a decision, whether a version bump in crate A translates to a breaking or non-breaking bump in crate B, assuming that B depends on A.

@epage
Copy link
Collaborator

epage commented Dec 20, 2022

#298 is where are we exploring automatic change detection.

This includes a subset of potential ways of moving forward with it, of having configuration for public dependencies. I keep hoping to not implement a bespoke version of public-private dependencies but for us to instead focus on getting the cargo feature implemented.

Going to close in favor of that other issue but I am hesitant to go forward with a bespoke public-private dependency system.

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2022
@thomaseizinger
Copy link
Author

Thanks for the pointer towards the RFC, agree with your decision.

I'll probably script something on top of cargo-release for our purposes.

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

No branches or pull requests

2 participants