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

silence warnings in the terminal #14258

Open
xxchan opened this issue Jul 16, 2024 · 2 comments · May be fixed by #14388
Open

silence warnings in the terminal #14258

xxchan opened this issue Jul 16, 2024 · 2 comments · May be fixed by #14388

Comments

@xxchan
Copy link
Contributor

xxchan commented Jul 16, 2024

I want to silence warnings without re-compiling, so I don't want to use RUSTFLAGS="-A warnings".


I'm here cause I was wanting a similar thing... I wish there was a way to run something like
cargo run --silence-warnings or cargo build --silence-warnings that silences all warnings except fatal errors. Maybe might print a single line telling you that warnings exist without the visual clutter of the warnings. It should still allow output logs from the compiled binary.

The main reason is that I work on some massive code bases and there's dead code and unused imports, etc everywhere on the dev branches and when I need to only focus on either actual fatal Errors. Sometimes there's so many warnings that it exceeds my terminal's max history and I can't even read the actual Errors that are thrown that my terminal that are preventing my code from compiling or running. Having to go around and put #![allow(foo_bar)] everywhere and then remove it would just take too much time.But that's currently one of my only options. Please, please, please do something about this. Not having this feature is one of the current banes of my existence :D

Originally posted by @noraa-july-stoke in #3591 (comment)


Related #8424

@rasheedmhd
Copy link

Here for the same reason

@epage
Copy link
Contributor

epage commented Aug 26, 2024

FYI our current plan is for our solution to #8424 to also solve this, see #14388

@epage epage linked a pull request Aug 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants