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

cargo build no-warning version that does not rebuild #9669

Closed
lattice0 opened this issue Jul 9, 2021 · 1 comment
Closed

cargo build no-warning version that does not rebuild #9669

lattice0 opened this issue Jul 9, 2021 · 1 comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@lattice0
Copy link

lattice0 commented Jul 9, 2021

The flag -Awarnings, when added like this:

RUSTFLAGS=-Awarnings cargo build

rebuild the entire project. It makes sense, of course, since the flags were changed.

However, disabling warnings is a very special case that should have an option on cargo that does not alter the flags and simply disables warnings. It's very annoying when you're developing and the project emits 70 warnings + 15 errors, and you have to find the errors in the middle of the warnings. And they are not even grouped together.

Putting -Awarnings and then taking it out makes the entire project rebuild, which takes 10 minutes for me. Not very good. A cargo build --no-warnings would be very useful.

@lattice0 lattice0 added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Jul 9, 2021
@ehuss
Copy link
Contributor

ehuss commented Aug 3, 2021

Thanks for the report! I'm going to close as there are already several issues covering this request. In particular, #8716 for caching changes in RUSTFLAGS, and #5034 and #3591 for allow Cargo itself to control lint levels.

@ehuss ehuss closed this as completed Aug 3, 2021
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

No branches or pull requests

2 participants