-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Warn about unrecognized sections #5264
Comments
I'm interested in working on this, please. I believe I'll have to look for the code to parse the Cargo.toml manifests? |
@iancormac84 awesome! All the code for that is in |
So my proposed plan of action is to use lev_distance to detect strings that may be referring to a 'patch' section and then warn about a possible mistake. How does that sound? Any other suggested manifest keys that may need a little warning attention while I'm at it? |
Well, I just fell for this. A hint would have saved me quite few minutes. Try to spot the error: serde = { version = "1.0.126", optional = true, feautres = ["derive"] } $ cargo build
...
error[E0433]: failed to resolve: could not find `Deserialize` in `serde`
... Solution
|
See also #3576 |
We already have serde_ignore to catch all unused keys, I believe this should already be resolved. Some sections accepting arbitrary keys are required special cares. I lean towards tackling them one by one if there is an issue.
What else do we need to handle?
|
Going to close this. If you have encountered any similar issue with a newer Cargo. Please leave a comment or file a new issue report. For the three remaining items mentioned in #5264 (comment), I personally don't think they are worth fixing. If anyone wants to do it, please file a new issue and we can start the discussion. Thank you! |
I regularly misspell patch overrides as
[path."https://github.com/foo/bar"]
, and it's always quite frustrating and easy to overlook while I'm trying to figure out why my override isn't taking effect.The text was updated successfully, but these errors were encountered: