-
Notifications
You must be signed in to change notification settings - Fork 476
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
Add cargo_warnings
config to control the use of the cargo warning instruction
#917
Conversation
src/lib.rs
Outdated
@@ -2382,7 +2405,7 @@ impl Build { | |||
enum ArchSpec { | |||
Device(&'static str), | |||
Simulator(&'static str), | |||
Catalyst(&'static str), | |||
Catalyst(#[allow(dead_code)] &'static str), |
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.
This is only here because the new nightly versions correctly detect that this field is never used, which causes the CI to fail.
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.
Thank you for the PR!
Can you please add a test for which warnings are disabled?
@scootermon if it's too hard to add testing, I'm ok with only test them on unix (since tests failed on windows) |
I added testing in the latest commits and there shouldn't be any problems on Windows because I'm not actually forking the process. The CI is failing because the tests are working :) We're still writing the warning "Compiler version doesn't include clang or GCC" to the console (because that's handled in
|
I suppose we should pass down the I suppose we can add a new type:
So that the |
670f63d
to
fc2fb66
Compare
@NobodyXu, apologies for the delay, got caught up with other stuff. I did end up having to skip the warnings_on test case on MSVC though because cl.exe apparently doesn't write compilation warnings to stderr... |
Co-authored-by: Jiahao XU <[email protected]>
Co-authored-by: Jiahao XU <[email protected]>
Co-authored-by: Jiahao XU <[email protected]>
Co-authored-by: Jiahao XU <[email protected]>
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.
Thanks, LGTM
Can you also resolve the conflict please?
Thank you! |
Closes: #916
I couldn't come up with a clean abstraction that doesn't needlessly bloat the code so I decided to keep it simple. Because of the lack of abstraction I'm somewhat concerned about maintainability though, as it might become harder to keep track of the warning instructions.
I also found some instances of
println!
s, which looked to me like they're supposed to be using the cargo warning instruction. I adjusted those, but let me know if that's incorrect.