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

unused [patch] section should emit warning #4870

Closed
SergioBenitez opened this issue Dec 28, 2017 · 3 comments · Fixed by #6276
Closed

unused [patch] section should emit warning #4870

SergioBenitez opened this issue Dec 28, 2017 · 3 comments · Fixed by #6276
Labels
A-patch Area: [patch] table override C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@SergioBenitez
Copy link
Contributor

SergioBenitez commented Dec 28, 2017

This is similar to #3099 and #3324 but for the new [patch] section. In particular, [patch] sections in non-virtual workspace manifests are silently ignored. Cargo should emit a warning or deny the [patch] section in non-root workspace crates entirely.

@alexcrichton alexcrichton added A-patch Area: [patch] table override C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` labels Dec 28, 2017
@alexcrichton
Copy link
Member

Agreed!

@MathieuDuponchelle
Copy link

Ideally, cargo should also explain why the patch section gets ignored, I don't know how difficult that is to implement though :)

@sdroege
Copy link
Contributor

sdroege commented Mar 30, 2018

If someone can provide a testcase I can take a look, but everything I tried either works correct (because the patch matches something), or it fails correctly with "error: failed to resolve patches for ..."

bors added a commit that referenced this issue Nov 7, 2018
Warn/err on some unused manifest keys in workspaces.

- Err on dependencies, features, target, badges in virtual root.
- Warn on replace/patch in members.

Closes #6248, Closes #4870, Closes #4947
@bors bors closed this as completed in #6276 Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-patch Area: [patch] table override C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants