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

It should be an error to have [patch] in Cargo.toml that's not in a workspace root #4947

Closed
Boscop opened this issue Jan 16, 2018 · 2 comments · Fixed by #6276
Closed

It should be an error to have [patch] in Cargo.toml that's not in a workspace root #4947

Boscop opened this issue Jan 16, 2018 · 2 comments · Fixed by #6276
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@Boscop
Copy link

Boscop commented Jan 16, 2018

It should be an error to have [patch] in Cargo.toml that's not in a workspace root because it has no effect and may lead people to think that they are patching when they are not.

@alexcrichton alexcrichton added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Jan 16, 2018
@exrook
Copy link

exrook commented Oct 7, 2018

I just spent some time running in to this issue wondering why my [patch] section had no effect. I see now that it is briefly mentioned in the documentation here, but it would be nice to at least have a warning that the section is being ignored. I'd be happy to submit a patch if someone could point me in the right direction to start from. :)

@alexcrichton
Copy link
Member

Oh awesome @exrook! Currently workspace validation happens around here and I think we'd want to start off with a warning (to avoid breaking older projects), but I suspect the fix for this would go around there

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
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.

3 participants