-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Lints should not break compilation of dependencies in cargo #1029
Comments
👍 I've resorted to |
👍 Agreed, this is pretty important to have. The example with |
triage: I-nominated recommend P-high/1.1 |
oops, wrong repo! |
👍 I think this makes a lot of sense. Heck, I'm not really sure if we should even use warnings for dependencies by default. Unless I'm willing to submit a PR to my dependency, I don't care whether it triggers lints internally. This could perhaps be some sort of configuration, e.g. in |
A bit of extra perspective from the C++ world (which I inhabit): it's common to include library headers with the So cargo being smart about this without extra work from the user would be seen as a really nice (albeit small) improvement over the C++ experience. It would be great to have this sooner rather than later, because it would give a nice first impression for all the C++ devs that will descend upon Rust when it hits 1.0. I think this fits well with @brson's idea that work between beta and 1.0 should be mostly polish. |
Yep. That's precisely what we did in Cargo. Would be nice for Cargo to also be able to pass a flag to |
It's very unfortunate if changing lints (e.g., adding a new lint, or making an existing lint stronger and better, or removing a lint that's not very useful) breaks compatibility guarantees. Moreover, lints are only really useful for the current crate you're working on, not for your dependencies. We need to adopt some scheme to avoid this. My rough proposal goes like this:
The idea here is that if I am using somebody's package, I don't want to have compilation fail because we added a new lint in the meantime. But if I am editing my own source code, I absolutely do want compilation to fail. I feel like this bridges the gap and avoids the problem of -Wall not being able to refer to "all".
The text was updated successfully, but these errors were encountered: