-
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
Reduce warning strictness #10742
Reduce warning strictness #10742
Conversation
r? @ehuss (rust-highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a person who heeds deprecation warnings, I have no objection to this change. Let's await feedback from others.
I think making it conditional on But I'm not sure I understand the change to deprecated. Shouldn't If the concern is that an update to a dependency deprecated something, then I think it is good that CI fails. That indicates something that should be addressed. CI failures like that are very rare, so I'm not sure if they are particularly painful. |
If the conversation on deprecations takes too long, I'll split these up. I wasn't sure what people's feelings would be on either so I put up both
I'm not too sure fully what all was going on but I was still getting deprecation warnings. My interest is for deprecations to be treated as warnings and never error. After dealing with being a clap client, I did similar in the CI for my projects.
From my experience, taking an approach like this leads to time lost and frustration, both for contributors and maintainers and I feel its not healthy for projects. If I wasn't using In my opinion, more projects should be using deprecations. They provide a compiler-aided approach for working through breaking changes and is a much better experience for upgrading. They also help avoid projects stalling out until their next breaking change (I've observed this in other projects I'm depending on). If I had been more on top of it, I would have proposed a RustConf talk encouraging this. |
A bold idea: Having a bot to collect warnings and post a comment in the PR to raise the visibility. The bot categorises warnings by deprecations, clippy warnings, or other built-in lint rules. So that either the PR author notices and fixes them, or the reviewer takes it as a reference to request a change, or everyone is happy to ignore it. |
There is a clippy action that makes comments: https://github.com/giraffate/clippy-action We could also use Serif which tracks alerts across commits and branches |
These tools are really cool! I'll vote allowing deprecations on CI with one of those GitHub Actions warning on deprecations. |
☔ The latest upstream changes (presumably #11699) made this pull request unmergeable. Please resolve the merge conflicts. |
Since #11699 got landed, is this pull request still useful? Looks like it is something we can close out. |
@weihanglo the thing that is still covered by this
Having a lockfile would also help with this which will hopefully be happening soon? |
With a |
What does this PR try to resolve?
This solves two use cases
How should we test and review this PR?
I didn't see any pertinent history for why
cargo
conditionsdeny(warnings)
oncfg(test)
while other parts of cargo usefeature = "deny-warnings"
, so I just went forward with this consolidation. It does mean some targets that we test without the feature might have warnings slip through though the risk is low.I tested this against clap
master
which adds more deprecations.Additional information
This does raise the risk of deprecations not being addressed but that is a question of contributor culture. I know I would look into it if I saw deprecation warnings go by and I would hope others would too.