-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
target json file contains unused fields
unaffected by -Dwarnings
#91262
Comments
We were getting a warning on an unknown key in the target spec file because there was a typo in the key. This warning should be an error, but it seems `-Dwarnings` does not cover it (reported upstream: rust-lang/rust#91262). However, the value was also wrong: PowerPC does not support the "kernel" machine model. Given PPC_64 modules use the large model, use that value for the moment for everything in PowerPC until we have proper target spec file generation (at which point, we will need to pick the right model in each sitaution for all architectures, properly). Signed-off-by: Miguel Ojeda <[email protected]>
We were getting a warning on an unknown key in the target spec file because there was a typo in the key. This warning should be an error, but it seems `-Dwarnings` does not cover it (reported upstream: rust-lang/rust#91262). However, the value was also wrong: PowerPC does not support the "kernel" machine model. Given PPC_64 modules use the large model, use that value for the moment for everything in PowerPC until we have proper target spec file generation (at which point, we will need to pick the right model in each sitaution for all architectures, properly). Signed-off-by: Miguel Ojeda <[email protected]>
This happens because the code is using |
Relevant code: rust/compiler/rustc_session/src/session.rs Lines 1468 to 1479 in 6d246f0
|
Thanks for the quick analysis -- will do! |
From the MCP/Zulip discussion,
|
what "MCP/Zulip" discussion are you referring to? |
rust-lang/compiler-team#473 was the MCP, and there is a link to the Zulip there from the bot (this one: https://rust-lang.zulipchat.com/#narrow/stream/233931-xxx/topic/.60-Dwarnings.60.20to.20cover.20all.20warnings.20compiler-team.23473) |
that is not the conclusion i see in that MCP: rust-lang/compiler-team#473 (comment)
|
My message was written before the second part of the discussion took place -- thanks for updating this! So, all warnings are intended to be covered, in the end? Are @nagisa's proposed hard errors in place now? |
i am not aware of any warnings being converted to hard errors. looking at the MCP, nagisa gave -C target-feature as an example of a diagnostic that should be converted to a hard error: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/.60-Dwarnings.60.20to.20cover.20all.20warnings.20compiler-team.23473/near/286500509 @nagisa were there any other diagnostics you wanted to change? i do see in retrospect that this is for a stable flag - maybe we should be using the future-incompat machinery instead of either hard warnings or hard errors? |
I’m… not sure. (I also have no recollection on whether I went on to make I don’t really have another example of a warning that should be an error instead. I was hoping for somebody to review warnings rustc can emit and summarize the list of those unaffected by the lint levels (as indicated earlier up thread in #91262 (comment).) |
I tried this:
I expected to see this happen: the
warning: target json file contains unused fields: foo
diagnostic to be an error.Instead, this happened: the warning is still a warning, even with
-Dwarnings
.If this is intended (i.e. if
-Dwarnings
is only intended for code-related diagnostics), then this issue would be a feature request: a way to control whether non-code warnings are (or not) errors for CI purposes.Meta
Happens in both stable (1.56.1) and the latest nightly:
The text was updated successfully, but these errors were encountered: