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

[feature request] set-version --workspace for multiple workspaces #882

Closed
bonsairobo opened this issue Dec 8, 2023 · 2 comments
Closed

Comments

@bonsairobo
Copy link

When working in a git repo with multiple cargo workspaces, I currently need to run cargo set-version --workspace --bump minor in every workspace directory, and then go and manually fix all of the cross-workspace dependencies.

It would be awesome if the command could take care of the cross-workspace dependencies for me. I'd be willing to submit a PR with some guidance as I know nothing about this codebase yet.

@epage
Copy link
Collaborator

epage commented Dec 8, 2023

These commands are being written as-if they will be merged into cargo and follow the patterns of existing cargo commands and try not to innovate on cargo's design.

The most likely route for this within cargo's design is rust-lang/cargo#5042

As this is out of scope, I'm closing. If there is a reason we should reconsider, let us know!

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2023
@aevyrie
Copy link

aevyrie commented Dec 8, 2023

We are specifically not interested in nested workspaces. This is for a monorepo where each directory in the root is an independent workspace, but we actively don't want all of these directories to be analyzed at once, because the cost to do so would be prohibitive.

Consider a company with multiple large products, each which have hundreds of dependencies without much dependency crossover. Having all of these dependencies (potentially thousands) pulled in while you are working on just one of those products is a pretty terrible developer experience. However, there is some crossover in core libraries, and sometimes you need to bump versions across the entire repo.

I think this is a legitimate use of cargo at a larger scale, and something that nested workspaces won't address. Another pragmatic example of this is the recursive flag in cargo-sweep (unofficial, I know 🙂). It's not uncommon for users of cargo to store multiple independent workspaces/crates as siblings in their filesystem, and as projects get large, that can be a useful tool with tradeoffs compared to lumping everything into a single workspace, especially in a monorepo environment. Thanks for your consideration!

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

3 participants