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

Finer-grained overrides in .cargo/config #736

Closed
codyps opened this issue Oct 21, 2014 · 3 comments
Closed

Finer-grained overrides in .cargo/config #736

codyps opened this issue Oct 21, 2014 · 3 comments
Labels
A-overrides Area: general issues with overriding dependencies (patch, replace, paths) C-enhancement Category: enhancement S-triage Status: This issue is waiting on initial triage.

Comments

@codyps
Copy link
Contributor

codyps commented Oct 21, 2014

As mentioned in #733, Local overrides via .cargo/config path = [ "foo" ] override all dependencies with the same name, even if they have different versions.

This contrasts the behavior when a project with a dep on one version of a library (A) also depends on anther lib (B) that pulls another version of the library A. In that case, both versions are included in the build.

Given the above, it will probably be useful to allow overrides on a finer grained basis.

@alexcrichton alexcrichton added the A-overrides Area: general issues with overriding dependencies (patch, replace, paths) label May 3, 2015
@carols10cents carols10cents added the C-enhancement Category: enhancement label May 10, 2017
@carols10cents carols10cents changed the title Local overrides override all dependencies of the same name Finer-grained overrides in .cargo/config May 10, 2017
@epage epage added the S-triage Status: This issue is waiting on initial triage. label May 3, 2023
@weihanglo
Copy link
Member

Cargo supports [patch] in Cargo configuration since 1.56. This should cover the use case.

As this is an old issue and dependency overriding has evolved since then, I am going to close this. If it is wrong or your scenario is yet covered, please let us know. Thank you!

@sanmai-NL
Copy link

@weihanglo Does [patch] not override all dependencies with the same name?

@weihanglo
Copy link
Member

Yes. It would respect the version and the source where the dependency comes from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-overrides Area: general issues with overriding dependencies (patch, replace, paths) C-enhancement Category: enhancement S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

6 participants