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

Specify dependencies in the workspace Cargo.toml #7552

Closed
emschwartz opened this issue Oct 29, 2019 · 2 comments
Closed

Specify dependencies in the workspace Cargo.toml #7552

emschwartz opened this issue Oct 29, 2019 · 2 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@emschwartz
Copy link

Currently, it is a pain to ensure that you only have one version of a dependency in a workspace with many crates. I work on a project with 16 crates in a workspace and regularly discover that we are depending on slightly different versions of the same dependency in different crates.

It would be nice to be able to specify dependencies that are used in different sub-crates in the workspace Cargo.toml. These could either automatically override the crates' Cargo.tomls like the [patch] section, or the individual crates could opt in to using the workspace-wide version by specifying version = "workspace".

Apologies if this has been requested before.

Also, thanks for all your work on cargo, it's excellent!

@emschwartz emschwartz added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Oct 29, 2019
@ehuss
Copy link
Contributor

ehuss commented Oct 29, 2019

Does #3931 look like what you're asking for?

@emschwartz
Copy link
Author

Yup, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

2 participants